Commit 7fe223d2 by Pascal Bigot

commit avant migration git

parent 168db6d4
......@@ -426,7 +426,14 @@ namespace CommonLib
XmlNode fontAttrib = fontNode.Attributes.GetNamedItem(XML_CF_ATTRIB.FontAttrib.ToString());
XmlNode fontSize = fontNode.Attributes.GetNamedItem(XML_CF_ATTRIB.FontSize.ToString());
XmlNode fontColor = fontNode.Attributes.GetNamedItem(XML_CF_ATTRIB.Color.ToString());
this.TextFont = new Font(fontName.Value, float.Parse(fontSize.Value), (FontStyle)Enum.Parse(typeof(FontStyle), fontAttrib.Value));
try
{
this.TextFont = new Font(fontName.Value, float.Parse(fontSize.Value), (FontStyle)Enum.Parse(typeof(FontStyle), fontAttrib.Value));
}
catch (Exception e)
{
Console.WriteLine("Error while reading font (control {0})", this.Symbol);
}
if (fontColor != null)
this.TextColor = ColorTranslate.StringToColor(fontColor.Value);
}
......
......@@ -99,19 +99,19 @@ namespace CommonLib
{
string strAppDir = Path.GetDirectoryName(Application.ExecutablePath);
AppIcon = NewIcoTrPath(strAppDir + "\\SmartApp.ico");
AlignLeft = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\AlignLeft.bmp");
AlignTop = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\AlignTop.bmp");
ArrangeAcross = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\ArrangeAcross.bmp");
ArrangeDown = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\ArrangeDown.bmp");
AlignLeft = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\AlignLeft.bmp");
AlignTop = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\AlignTop.bmp");
ArrangeAcross = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\ArrangeAcross.bmp");
ArrangeDown = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\ArrangeDown.bmp");
BottomBtn = NewBmpTrPath(strAppDir + "\\Res\\DownBtn.bmp");
BottomLeftBtn = NewBmpTrPath(strAppDir + "\\Res\\BottomLeftBtn.bmp");
BottomRightBtn = NewBmpTrPath(strAppDir + "\\Res\\BottomRightBtn.bmp");
CheckBox = NewBmpTrPath(strAppDir + "\\Res\\CheckBox.bmp");
DropBtn = NewBmpTrPath(strAppDir + "\\Res\\DropBtn.bmp");
LeftBtn = NewBmpTrPath(strAppDir + "\\Res\\LeftBtn.bmp");
MakeSameBoth = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\MakeSameBoth.bmp");
MakeSameHeight = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\MakeSameHeight.bmp");
MakeSameWidth = NewBmpTrPath(strAppDir + "\\Res\\ToolBar\\MakeSameWidth.bmp");
MakeSameBoth = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\MakeSameBoth.bmp");
MakeSameHeight = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\MakeSameHeight.bmp");
MakeSameWidth = NewBmpTrPath(strAppDir + "\\Res\\Toolbar\\MakeSameWidth.bmp");
PresAssData = NewBmpTrPath(strAppDir + "\\Res\\PresAssData.bmp");
RightBtn = NewBmpTrPath(strAppDir + "\\Res\\RightBtn.bmp");
SliderBar = NewBmpTrPath(strAppDir + "\\Res\\SliderBar.bmp");
......@@ -170,12 +170,28 @@ namespace CommonLib
public static Bitmap NewBmpTrPath(string path)
{
return new Bitmap(PathTranslator.LinuxVsWindowsPathUse(path));
try
{
return new Bitmap(PathTranslator.LinuxVsWindowsPathUse(path));
}
catch (Exception e)
{
Console.WriteLine(string.Format("Error while loading res named {0}", path));
}
return null;
}
public static Icon NewIcoTrPath(string path)
{
return new Icon(PathTranslator.LinuxVsWindowsPathUse(path));
try
{
return new Icon(PathTranslator.LinuxVsWindowsPathUse(path));
}
catch (Exception e)
{
Console.WriteLine(string.Format("Error while loading res named {0}", path));
}
return null;
}
}
}
......@@ -197,12 +197,14 @@ namespace CommonLib
strErr = Lang.LangSys.C("Invalid com port");
return false;
}
#if LINUX
#else
if (!Param.StartsWith("COM"))
{
strErr = Lang.LangSys.C("Invalid Serial port");
return false;
}
#endif
}
else if (TYPE_COMM.VIRTUAL.ToString() == Type)
{
......
<Root>
<FileHeader>
<FileVersion Indice="3" />
<SoftVersion Indice="3.2.0.0" />
<SoftVersion Indice="3.2.0.2" />
</FileHeader>
<Comm>
<CommType>ETHERNET</CommType>
......
<Root>
<FileHeader>
<FileVersion Indice="3" />
<SoftVersion Indice="3.2.0.0" />
<SoftVersion Indice="3.2.0.2" />
</FileHeader>
<Comm>
<CommType>ETHERNET</CommType>
......
......@@ -3,5 +3,6 @@
<ProjectList>
<ProjectList Value="$DocPath$\M3_ETH.saf" />
<ProjectList Value="$DocPath$\M3_Serial.saf" />
<ProjectList Value="$DocPath$\test.sab" />
</ProjectList>
</Solution>
\ No newline at end of file
......@@ -20,24 +20,57 @@ namespace ScreenItemLocker
lstScreen_SelectedIndexChanged(null, null);
}
#region validation des données
/// <summary>
/// Accesseur de validité des propriétés
/// renvoie true si les propriété sont valides, sinon false
/// </summary>
public override bool IsObjectPropertiesValid
{
get
{
return true;
}
}
/// <summary>
/// validitation des propriétés
/// </summary>
/// <returns>true si les propriété sont valides, sinon false</returns>
public override bool ValidateProperties()
{
return true;
}
public void PanelToObject()
{
m_Props.ListItemSymbol.Clear();
((DllScreenItemLockerProp)m_Control.SpecificProp).ListItemSymbol.Clear();
for (int i = 0; i < lstSelected.Items.Count; i++)
{
m_Props.ListItemSymbol.Add(lstSelected.Items[i].ToString());
((DllScreenItemLockerProp)m_Control.SpecificProp).ListItemSymbol.Add(lstSelected.Items[i].ToString());
}
m_Control.SpecificProp.CopyParametersFrom(m_Props, false, this.Document);
//m_Control.SpecificProp.CopyParametersFrom(m_Props, false, this.Document);
Document.Modified = true;
}
public void ObjectToPanel()
{
m_Props.CopyParametersFrom(m_Control.SpecificProp, false, this.Document);
m_Props.ListItemSymbol.Clear();
for (int i = 0; i < ((DllScreenItemLockerProp)m_Control.SpecificProp).ListItemSymbol.Count; i++)
{
m_Props.ListItemSymbol.Add(((DllScreenItemLockerProp)m_Control.SpecificProp).ListItemSymbol[i]);
}
//m_Props.CopyParametersFrom(m_Control.SpecificProp, false, this.Document);
InitCurrentSelectionList();
InitScreenItemList();
}
#endregion
/// <summary>
///
/// </summary>
......
......@@ -80,7 +80,7 @@ namespace SmartApp
[STAThread]
static void Main(string[] strArgsList)
{
Application.EnableVisualStyles();
//Application.EnableVisualStyles();
// attention, cette ligne est toujours appelé, mais dans la création du singleton de la fenêtre principale
// car les membres étant statiques, il provoquent la création de la fenêtre pendant le chargement même de l'application
Application.SetCompatibleTextRenderingDefault(false);
......
......@@ -58,7 +58,7 @@ namespace SmartAppUpdater
public static void StartBatchCopy()
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "postUpdateCopy.bat";
psi.FileName = "\"" + Application.StartupPath + "postUpdateCopy.bat\"";
psi.Arguments = " > updatelog.txt";
psi.UseShellExecute = true;
Process copyProcess = Process.Start(psi);
......
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