Commit 113fdad2 by Pascal Bigot

--no commit message

parent 6fa1cef6
...@@ -894,6 +894,9 @@ namespace CommonLib ...@@ -894,6 +894,9 @@ namespace CommonLib
return true; return true;
} }
/// <summary>
///
/// </summary>
public void CloseDocumentForCommand() public void CloseDocumentForCommand()
{ {
if (m_FormList.Count != 0) if (m_FormList.Count != 0)
...@@ -913,25 +916,40 @@ namespace CommonLib ...@@ -913,25 +916,40 @@ namespace CommonLib
} }
/// <summary>
///
/// </summary>
public void BuildStatFileInfo() public void BuildStatFileInfo()
{ {
int iNbData = m_GestData.Count; int iNbData = m_GestData.Count;
int iNbScreen = m_GestScreen.Count; int iNbScreen = m_GestScreen.Count;
int iMoyItemPersScreen = 0; int iMoyItemPersScreen = 0;
int iScreenItemMoyScriptLines = 0;
int iNbItemWithScript = 0;
for (int i = 0; i < m_GestScreen.Count; i++) for (int i = 0; i < m_GestScreen.Count; i++)
{ {
BTScreen scr = m_GestScreen[i] as BTScreen; BTScreen scr = m_GestScreen[i] as BTScreen;
iMoyItemPersScreen += scr.Controls.Count; 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; iMoyItemPersScreen = iMoyItemPersScreen / iNbScreen;
int iNbTimer = m_GestTimer.Count; int iNbTimer = m_GestTimer.Count;
int iNbFunction = m_GestFunction.Count; int iNbFunction = m_GestFunction.Count;
int iNbLogger = m_GestLogger.Count; int iNbLogger = m_GestLogger.Count;
int iFunctionMoyScriptLines; int iFunctionMoyScriptLines = 0;
int iNbTotalScriptCount; int iNbTotalScriptCount = 0;
int iFunctionMaxScriptLines; int iFunctionMaxScriptLines = 0;
for (int i = 0; i < m_GestFunction.Count; i++) for (int i = 0; i < m_GestFunction.Count; i++)
{ {
Function item = m_GestFunction[i] as Function; Function item = m_GestFunction[i] as Function;
...@@ -949,10 +967,7 @@ namespace CommonLib ...@@ -949,10 +967,7 @@ namespace CommonLib
} }
iFunctionMoyScriptLines = iFunctionMoyScriptLines / iNbTotalScriptCount; iFunctionMoyScriptLines = iFunctionMoyScriptLines / iNbTotalScriptCount;
int iScreenItemMoyScriptLines; string commType = m_Comm.CommType.ToString();
int iScreenItemMaxScriptLines;
string commType = m_Comm.CommType;
} }
} }
} }
...@@ -90,6 +90,7 @@ namespace CommonLib ...@@ -90,6 +90,7 @@ namespace CommonLib
BTDoc openedDoc = new BTDoc(m_TypeApp); BTDoc openedDoc = new BTDoc(m_TypeApp);
if (openedDoc.ReadConfigDocument(strFilePath, m_TypeApp, m_GestDLL)) if (openedDoc.ReadConfigDocument(strFilePath, m_TypeApp, m_GestDLL))
{ {
openedDoc.BuildStatFileInfo();
this.Add(strFilePath, openedDoc); this.Add(strFilePath, openedDoc);
Modified = true; Modified = true;
openedDoc.OnDocumentModified += new DocumentModifiedEvent(OnDocumentModified); openedDoc.OnDocumentModified += new DocumentModifiedEvent(OnDocumentModified);
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
this.Name = "BasePropertiesDialog"; this.Name = "BasePropertiesDialog";
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Properties"; this.Text = "Properties";
this.Deactivate += new System.EventHandler(this.BasePropertiesDialog_Leave); this.Deactivate += new System.EventHandler(this.BasePropertiesDialog_Leave);
this.Activated += new System.EventHandler(this.BasePropertiesDialog_Enter); this.Activated += new System.EventHandler(this.BasePropertiesDialog_Enter);
......
...@@ -48,7 +48,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ ...@@ -48,7 +48,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
[Dirs] [Dirs]
Name: "{app}" ; Permissions : everyone-modify Name: "{app}" ; Permissions : everyone-modify
Name: "{app}\tmpUpdate" ; Permissions : everyone-modify
[Files] [Files]
; exe principal de l'application ; exe principal de l'application
...@@ -99,6 +99,7 @@ Root: HKCR; Subkey: "smartappslt\shell\open\command"; ValueType: string; ValueNa ...@@ -99,6 +99,7 @@ Root: HKCR; Subkey: "smartappslt\shell\open\command"; ValueType: string; ValueNa
[Icons] [Icons]
Name: "{group}\Smart Config V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}" 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 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: "{group}\{cm:UninstallProgram,Smart Application V3}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Smart Config V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"; Tasks: desktopicon 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" Name: "{commondesktop}\Smart Command V3"; Filename: "{app}\SmartApp.exe"; WorkingDir: "{app}"; Tasks: desktopicon ;Parameters: "-cmd"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<CommParam>192.168.0.99:502</CommParam> <CommParam>192.168.0.99:502</CommParam>
</Comm> </Comm>
<ProjOptions> <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> </ProjOptions>
<PluginsGlobals /> <PluginsGlobals />
<DataSection> <DataSection>
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<ScreenSection> <ScreenSection>
<Screen strSymbol="MAIN_SCREEN" strNom="" Text=""> <Screen strSymbol="MAIN_SCREEN" strNom="" Text="">
<ControlList> <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" /> <Font FontName="Microsoft Sans Serif" FontAttrib="Regular" FontSize="8,25" Color="0, 0, 0" />
<EventScript /> <EventScript />
</Control> </Control>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<CommParam>192.168.0.99:502</CommParam> <CommParam>192.168.0.99:502</CommParam>
</Comm> </Comm>
<ProjOptions> <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> </ProjOptions>
<PluginsGlobals /> <PluginsGlobals />
<DataSection> <DataSection>
......
...@@ -40,6 +40,7 @@ namespace SmartApp.Ihm ...@@ -40,6 +40,7 @@ namespace SmartApp.Ihm
this.menuItemAddProj_M3ETHWiz = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemAddProj_M3ETHWiz = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemAddProj_Z2SLWiz = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemAddProj_Z2SLWiz = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemAddProj_Z2ETHWiz = 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.menuItemCloseSolution = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuItemSave = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemSave = new System.Windows.Forms.ToolStripMenuItem();
...@@ -68,6 +69,7 @@ namespace SmartApp.Ihm ...@@ -68,6 +69,7 @@ namespace SmartApp.Ihm
this.menuTools = new System.Windows.Forms.ToolStripMenuItem(); this.menuTools = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemOptions = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemOptions = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemJumpToCmd = 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.menuView = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemViewHideToolbar = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemViewHideToolbar = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemViewHideStatusBar = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemViewHideStatusBar = new System.Windows.Forms.ToolStripMenuItem();
...@@ -102,7 +104,6 @@ namespace SmartApp.Ihm ...@@ -102,7 +104,6 @@ namespace SmartApp.Ihm
this.lblToolsView = new System.Windows.Forms.Label(); this.lblToolsView = new System.Windows.Forms.Label();
this.toolsPanel = new System.Windows.Forms.Panel(); this.toolsPanel = new System.Windows.Forms.Panel();
this.btnHideShowRightPanel = new System.Windows.Forms.Button(); this.btnHideShowRightPanel = new System.Windows.Forms.Button();
this.menuItemaddBridge = new System.Windows.Forms.ToolStripMenuItem();
this.m_menuStrip.SuspendLayout(); this.m_menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout(); this.statusStrip.SuspendLayout();
this.m_toolStrip.SuspendLayout(); this.m_toolStrip.SuspendLayout();
...@@ -229,6 +230,14 @@ namespace SmartApp.Ihm ...@@ -229,6 +230,14 @@ namespace SmartApp.Ihm
this.menuItemAddProj_Z2ETHWiz.Text = "Z2 SR3NET Project Wizard"; this.menuItemAddProj_Z2ETHWiz.Text = "Z2 SR3NET Project Wizard";
this.menuItemAddProj_Z2ETHWiz.Click += new System.EventHandler(this.menuItemAddProj_Z2ETHWiz_Click); 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 // menuItemCloseSolution
// //
this.menuItemCloseSolution.Name = "menuItemCloseSolution"; this.menuItemCloseSolution.Name = "menuItemCloseSolution";
...@@ -426,7 +435,8 @@ namespace SmartApp.Ihm ...@@ -426,7 +435,8 @@ namespace SmartApp.Ihm
// //
this.menuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuItemOptions, this.menuItemOptions,
this.menuItemJumpToCmd}); this.menuItemJumpToCmd,
this.menuItemCheckForUpdates});
this.menuTools.Name = "menuTools"; this.menuTools.Name = "menuTools";
this.menuTools.Size = new System.Drawing.Size(48, 20); this.menuTools.Size = new System.Drawing.Size(48, 20);
this.menuTools.Text = "&Tools"; this.menuTools.Text = "&Tools";
...@@ -437,6 +447,7 @@ namespace SmartApp.Ihm ...@@ -437,6 +447,7 @@ namespace SmartApp.Ihm
this.menuItemOptions.Size = new System.Drawing.Size(227, 22); this.menuItemOptions.Size = new System.Drawing.Size(227, 22);
this.menuItemOptions.Text = "&Options"; this.menuItemOptions.Text = "&Options";
this.menuItemOptions.Visible = false; this.menuItemOptions.Visible = false;
this.menuItemOptions.Click += new System.EventHandler(this.menuItemOptions_Click);
// //
// menuItemJumpToCmd // menuItemJumpToCmd
// //
...@@ -447,6 +458,13 @@ namespace SmartApp.Ihm ...@@ -447,6 +458,13 @@ namespace SmartApp.Ihm
this.menuItemJumpToCmd.Text = "Jump to SmartCommand"; this.menuItemJumpToCmd.Text = "Jump to SmartCommand";
this.menuItemJumpToCmd.Click += new System.EventHandler(this.JumpToSmartCommandMenuItemClick); 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 // menuView
// //
this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
...@@ -766,14 +784,6 @@ namespace SmartApp.Ihm ...@@ -766,14 +784,6 @@ namespace SmartApp.Ihm
this.btnHideShowRightPanel.UseVisualStyleBackColor = true; this.btnHideShowRightPanel.UseVisualStyleBackColor = true;
this.btnHideShowRightPanel.Click += new System.EventHandler(this.btnHideShowRightPanel_Click); 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 // MDISmartConfigMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
...@@ -879,6 +889,7 @@ namespace SmartApp.Ihm ...@@ -879,6 +889,7 @@ namespace SmartApp.Ihm
private System.Windows.Forms.Panel toolsPanel; private System.Windows.Forms.Panel toolsPanel;
private System.Windows.Forms.Button btnHideShowRightPanel; private System.Windows.Forms.Button btnHideShowRightPanel;
private System.Windows.Forms.ToolStripMenuItem menuItemaddBridge; private System.Windows.Forms.ToolStripMenuItem menuItemaddBridge;
private System.Windows.Forms.ToolStripMenuItem menuItemCheckForUpdates;
} }
} }
......
...@@ -318,6 +318,11 @@ namespace SmartApp.Ihm ...@@ -318,6 +318,11 @@ namespace SmartApp.Ihm
UpdateTitle(); UpdateTitle();
UpdateFileMenu(); 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) void GestSolution_OnDocClosed(BaseDoc doc)
...@@ -382,6 +387,12 @@ namespace SmartApp.Ihm ...@@ -382,6 +387,12 @@ namespace SmartApp.Ihm
{ {
SolutionAskUserToSaveIfIsModified(); SolutionAskUserToSaveIfIsModified();
this.SolutionClose(); this.SolutionClose();
if (MDISmartConfigMain.GlobalPropDialog != null)
{
m_FrmOpt.SetFormPos(m_PropDialog);
m_FrmOpt.SetFormSize(m_PropDialog);
m_FrmOpt.Save();
}
this.Close(); this.Close();
} }
#endregion #endregion
...@@ -567,6 +578,14 @@ namespace SmartApp.Ihm ...@@ -567,6 +578,14 @@ namespace SmartApp.Ihm
private void OnFormClosing(object sender, FormClosingEventArgs e) private void OnFormClosing(object sender, FormClosingEventArgs e)
{ {
SolutionAskUserToSaveIfIsModified(); SolutionAskUserToSaveIfIsModified();
SolutionClose();
if (MDISmartConfigMain.GlobalPropDialog != null)
{
m_FrmOpt.SetFormPos(m_PropDialog);
m_FrmOpt.SetFormSize(m_PropDialog);
m_FrmOpt.Save();
}
m_mruStripMenu.SaveToFile(); m_mruStripMenu.SaveToFile();
} }
...@@ -1043,5 +1062,24 @@ namespace SmartApp.Ihm ...@@ -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