Commit 113fdad2 by Pascal Bigot

--no commit message

parent 6fa1cef6
......@@ -894,6 +894,9 @@ namespace CommonLib
return true;
}
/// <summary>
///
/// </summary>
public void CloseDocumentForCommand()
{
if (m_FormList.Count != 0)
......@@ -913,25 +916,40 @@ namespace CommonLib
}
/// <summary>
///
/// </summary>
public void BuildStatFileInfo()
{
int iNbData = m_GestData.Count;
int iNbScreen = m_GestScreen.Count;
int iMoyItemPersScreen = 0;
int iScreenItemMoyScriptLines = 0;
int iNbItemWithScript = 0;
for (int i = 0; i < m_GestScreen.Count; i++)
{
BTScreen scr = m_GestScreen[i] as BTScreen;
iMoyItemPersScreen += scr.Controls.Count;
for(int j = 0; j< scr.Controls.Count; j++)
{
BTControl ctrl = scr.Controls[j] as BTControl;
foreach (string key in ctrl.ItemScripts.ScriptKeys)
{
iScreenItemMoyScriptLines += ctrl.ItemScripts[key].Length;
}
iNbItemWithScript++;
}
}
iScreenItemMoyScriptLines = iScreenItemMoyScriptLines / iNbItemWithScript;
iMoyItemPersScreen = iMoyItemPersScreen / iNbScreen;
int iNbTimer = m_GestTimer.Count;
int iNbFunction = m_GestFunction.Count;
int iNbLogger = m_GestLogger.Count;
int iFunctionMoyScriptLines;
int iNbTotalScriptCount;
int iFunctionMaxScriptLines;
int iFunctionMoyScriptLines = 0;
int iNbTotalScriptCount = 0;
int iFunctionMaxScriptLines = 0;
for (int i = 0; i < m_GestFunction.Count; i++)
{
Function item = m_GestFunction[i] as Function;
......@@ -949,10 +967,7 @@ namespace CommonLib
}
iFunctionMoyScriptLines = iFunctionMoyScriptLines / iNbTotalScriptCount;
int iScreenItemMoyScriptLines;
int iScreenItemMaxScriptLines;
string commType = m_Comm.CommType;
string commType = m_Comm.CommType.ToString();
}
}
}
......@@ -90,6 +90,7 @@ namespace CommonLib
BTDoc openedDoc = new BTDoc(m_TypeApp);
if (openedDoc.ReadConfigDocument(strFilePath, m_TypeApp, m_GestDLL))
{
openedDoc.BuildStatFileInfo();
this.Add(strFilePath, openedDoc);
Modified = true;
openedDoc.OnDocumentModified += new DocumentModifiedEvent(OnDocumentModified);
......
......@@ -97,7 +97,7 @@
this.Name = "BasePropertiesDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Properties";
this.Deactivate += new System.EventHandler(this.BasePropertiesDialog_Leave);
this.Activated += new System.EventHandler(this.BasePropertiesDialog_Enter);
......
......@@ -48,7 +48,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
[Dirs]
Name: "{app}" ; Permissions : everyone-modify
Name: "{app}\tmpUpdate" ; Permissions : everyone-modify
[Files]
; exe principal de l'application
......@@ -99,6 +99,7 @@ Root: HKCR; Subkey: "smartappslt\shell\open\command"; ValueType: string; ValueNa
[Icons]
Name: "{group}\Smart Config V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"
Name: "{group}\Smart Command V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"; Parameters: "-cmd"
Name: "{group}\Smart App Updater"; Filename: "{app}\SmartAppUpdater.exe"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,Smart Application V3}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Smart Config V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"; Tasks: desktopicon
Name: "{commondesktop}\Smart Command V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"; Tasks: desktopicon ;Parameters: "-cmd"
......
......@@ -8,7 +8,7 @@
<CommParam>192.168.0.99:502</CommParam>
</Comm>
<ProjOptions>
<MainContainer IsUsed="False" size="-1,-1" Pos="-1,-1" ShowInTaskBar="True" ShowTitleBar="True" />
<MainContainer IsUsed="False" size="-1,-1" Pos="-1,-1" ShowInTaskBar="True" ShowTitleBar="True" MCTitle="" />
</ProjOptions>
<PluginsGlobals />
<DataSection>
......@@ -144,7 +144,7 @@
<ScreenSection>
<Screen strSymbol="MAIN_SCREEN" strNom="" Text="">
<ControlList>
<Control strSymbol="NEW_CTRL_0" strNom="" Type="UP_DOWN" AssociateData="ETH_OUT7_I1" ScreenEvent="False" Pos="90,77" size="56,20" Text="" ReadOnly="False">
<Control strSymbol="NEW_CTRL_0" strNom="" Type="UP_DOWN" AssociateData="ETH_OUT7_I1" ScreenEvent="False" Pos="90,76" size="56,20" Text="" ReadOnly="False">
<Font FontName="Microsoft Sans Serif" FontAttrib="Regular" FontSize="8,25" Color="0, 0, 0" />
<EventScript />
</Control>
......
......@@ -8,7 +8,7 @@
<CommParam>192.168.0.99:502</CommParam>
</Comm>
<ProjOptions>
<MainContainer IsUsed="False" size="-1,-1" Pos="-1,-1" ShowInTaskBar="True" ShowTitleBar="True" />
<MainContainer IsUsed="False" size="-1,-1" Pos="-1,-1" ShowInTaskBar="True" ShowTitleBar="True" MCTitle="" />
</ProjOptions>
<PluginsGlobals />
<DataSection>
......
......@@ -40,6 +40,7 @@ namespace SmartApp.Ihm
this.menuItemAddProj_M3ETHWiz = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemAddProj_Z2SLWiz = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemAddProj_Z2ETHWiz = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemaddBridge = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemCloseSolution = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuItemSave = new System.Windows.Forms.ToolStripMenuItem();
......@@ -68,6 +69,7 @@ namespace SmartApp.Ihm
this.menuTools = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemOptions = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemJumpToCmd = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemCheckForUpdates = new System.Windows.Forms.ToolStripMenuItem();
this.menuView = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemViewHideToolbar = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemViewHideStatusBar = new System.Windows.Forms.ToolStripMenuItem();
......@@ -102,7 +104,6 @@ namespace SmartApp.Ihm
this.lblToolsView = new System.Windows.Forms.Label();
this.toolsPanel = new System.Windows.Forms.Panel();
this.btnHideShowRightPanel = new System.Windows.Forms.Button();
this.menuItemaddBridge = new System.Windows.Forms.ToolStripMenuItem();
this.m_menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout();
this.m_toolStrip.SuspendLayout();
......@@ -229,6 +230,14 @@ namespace SmartApp.Ihm
this.menuItemAddProj_Z2ETHWiz.Text = "Z2 SR3NET Project Wizard";
this.menuItemAddProj_Z2ETHWiz.Click += new System.EventHandler(this.menuItemAddProj_Z2ETHWiz_Click);
//
// menuItemaddBridge
//
this.menuItemaddBridge.Name = "menuItemaddBridge";
this.menuItemaddBridge.Size = new System.Drawing.Size(196, 22);
this.menuItemaddBridge.Text = "Add bridge to solution";
this.menuItemaddBridge.Visible = false;
this.menuItemaddBridge.Click += new System.EventHandler(this.menuItemaddBridge_Click);
//
// menuItemCloseSolution
//
this.menuItemCloseSolution.Name = "menuItemCloseSolution";
......@@ -426,7 +435,8 @@ namespace SmartApp.Ihm
//
this.menuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuItemOptions,
this.menuItemJumpToCmd});
this.menuItemJumpToCmd,
this.menuItemCheckForUpdates});
this.menuTools.Name = "menuTools";
this.menuTools.Size = new System.Drawing.Size(48, 20);
this.menuTools.Text = "&Tools";
......@@ -437,6 +447,7 @@ namespace SmartApp.Ihm
this.menuItemOptions.Size = new System.Drawing.Size(227, 22);
this.menuItemOptions.Text = "&Options";
this.menuItemOptions.Visible = false;
this.menuItemOptions.Click += new System.EventHandler(this.menuItemOptions_Click);
//
// menuItemJumpToCmd
//
......@@ -447,6 +458,13 @@ namespace SmartApp.Ihm
this.menuItemJumpToCmd.Text = "Jump to SmartCommand";
this.menuItemJumpToCmd.Click += new System.EventHandler(this.JumpToSmartCommandMenuItemClick);
//
// menuItemCheckForUpdates
//
this.menuItemCheckForUpdates.Name = "menuItemCheckForUpdates";
this.menuItemCheckForUpdates.Size = new System.Drawing.Size(227, 22);
this.menuItemCheckForUpdates.Text = "Check for updates";
this.menuItemCheckForUpdates.Click += new System.EventHandler(this.menuItemCheckForUpdates_Click);
//
// menuView
//
this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
......@@ -766,14 +784,6 @@ namespace SmartApp.Ihm
this.btnHideShowRightPanel.UseVisualStyleBackColor = true;
this.btnHideShowRightPanel.Click += new System.EventHandler(this.btnHideShowRightPanel_Click);
//
// menuItemaddBridge
//
this.menuItemaddBridge.Name = "menuItemaddBridge";
this.menuItemaddBridge.Size = new System.Drawing.Size(196, 22);
this.menuItemaddBridge.Text = "Add bridge to solution";
this.menuItemaddBridge.Visible = false;
this.menuItemaddBridge.Click += new System.EventHandler(this.menuItemaddBridge_Click);
//
// MDISmartConfigMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......@@ -879,6 +889,7 @@ namespace SmartApp.Ihm
private System.Windows.Forms.Panel toolsPanel;
private System.Windows.Forms.Button btnHideShowRightPanel;
private System.Windows.Forms.ToolStripMenuItem menuItemaddBridge;
private System.Windows.Forms.ToolStripMenuItem menuItemCheckForUpdates;
}
}
......
......@@ -318,6 +318,11 @@ namespace SmartApp.Ihm
UpdateTitle();
UpdateFileMenu();
}
if (MDISmartConfigMain.GlobalPropDialog != null)
{
m_PropDialog.Location = m_FrmOpt.GetFormPos(m_PropDialog);
m_PropDialog.Size = m_FrmOpt.GetFormSize(m_PropDialog);
}
}
void GestSolution_OnDocClosed(BaseDoc doc)
......@@ -382,6 +387,12 @@ namespace SmartApp.Ihm
{
SolutionAskUserToSaveIfIsModified();
this.SolutionClose();
if (MDISmartConfigMain.GlobalPropDialog != null)
{
m_FrmOpt.SetFormPos(m_PropDialog);
m_FrmOpt.SetFormSize(m_PropDialog);
m_FrmOpt.Save();
}
this.Close();
}
#endregion
......@@ -567,6 +578,14 @@ namespace SmartApp.Ihm
private void OnFormClosing(object sender, FormClosingEventArgs e)
{
SolutionAskUserToSaveIfIsModified();
SolutionClose();
if (MDISmartConfigMain.GlobalPropDialog != null)
{
m_FrmOpt.SetFormPos(m_PropDialog);
m_FrmOpt.SetFormSize(m_PropDialog);
m_FrmOpt.Save();
}
m_mruStripMenu.SaveToFile();
}
......@@ -1043,5 +1062,24 @@ namespace SmartApp.Ihm
}
}
private void menuItemCheckForUpdates_Click(object sender, EventArgs e)
{
if (this.SolutionAskUserToSaveIfIsModified())
{
MessageBox.Show(Program.LangSys.C("All SmartApp instances must be closed before lauching update process"),
Program.LangSys.C("Warning"),MessageBoxButtons.OK, MessageBoxIcon.Warning);
System.Diagnostics.Process proc = new System.Diagnostics.Process();
string Arguments = "-Lang " + SmartApp.Properties.Settings.Default.Lang;
proc.StartInfo = new System.Diagnostics.ProcessStartInfo(Application.StartupPath + Path.DirectorySeparatorChar + "SmartAppUpdater.exe", Arguments);
proc.Start();
this.ExitSmartConfig();
}
}
private void menuItemOptions_Click(object sender, EventArgs e)
{
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment