コード例 #1
0
        private void FormLoad(object sender, EventArgs e)
        {
            double min = GridInfo.MIN_GRID_VALUE / 10000.0F;
            double max = GridInfo.MAX_GRID_VALUE / 10000.0F;

            colorTextBack = textPitch.BackColor;

            labelPitchRange.Text     = String.Format("({0:##0.0###} - {1:##0.0###}mm)", min, max);
            spinDisplayEvery.Maximum = GridInfo.MIN_GRID_DISPLAY_EVERY;
            spinDisplayEvery.Maximum = GridInfo.MAX_GRID_DISPLAY_EVERY;

            SetCurrentGridInfoToCtrl();

            buttonDelete.Enabled = false;
            buttonUp.Enabled     = false; //20111008
            buttonDown.Enabled   = false; //20111008


            //MyStandard値のロード
#if !MONO
            Properties.Settings.Default.Reload();
#endif
            string     strGridInfo         = Properties.Settings.Default.MyStandardGridString;
            MbeMyStd[] myStandardGridArray = MbeMyStd.LoadMyStdInfoArray(strGridInfo);

            foreach (MbeMyStd gridInfo in myStandardGridArray)
            {
                listBoxMyStandard.Items.Add((GridInfo)gridInfo);
            }
        }
コード例 #2
0
        private void SaveMyStandard()
        {
            int count = listBoxMyStandard.Items.Count;

            TextInfo[] myStdInfoArray = new TextInfo[count];
            for (int i = 0; i < count; i++)
            {
                myStdInfoArray[i] = (TextInfo)(listBoxMyStandard.Items[i]);
            }
            Properties.Settings.Default.MyStandardTextString = MbeMyStd.SaveMyStdInfoArray(myStdInfoArray);
        }
コード例 #3
0
        private void LoadMyStandard()
        {
            //MyStandard値のロード
            string strMyStdInfo = Properties.Settings.Default.MyStandardTextString;

            MbeMyStd[] myStdInfoArray = MbeMyStd.LoadMyStdInfoArray(strMyStdInfo);

            foreach (MbeMyStd info in myStdInfoArray)
            {
                listBoxMyStandard.Items.Add((TextInfo)info);
            }
        }
コード例 #4
0
        //private string[] libPathNameArray;

        //public string[] LibPathNameArray
        //{
        //    get { return libPathNameArray; }
        //    //set { libPathNameArray = value; }
        //}

        private void LoadMyStandard()
        {
            //MyStandard値のロード
            string strMyStdInfo = Properties.Settings.Default.MyStandardLibString;

            MbeMyStd[] myStdInfoArray = MbeMyStd.LoadMyStdInfoArray(strMyStdInfo);

            foreach (MbeMyStd info in myStdInfoArray)
            {
                listBoxLib.Items.Add(((LibInfo)info).LibPath);
            }
        }
コード例 #5
0
        public static void SaveMyStandard(List <PrintPageLayerInfo> infoList)
        {
            int count = infoList.Count;

            PrintPageLayerInfo[] myStdInfoArray = new PrintPageLayerInfo[count];
            for (int i = 0; i < count; i++)
            {
                myStdInfoArray[i] = infoList[i];
            }
            Properties.Settings.Default.MyStandardPrintPageLayerString = MbeMyStd.SaveMyStdInfoArray(myStdInfoArray);
            Properties.Settings.Default.Save();
        }
コード例 #6
0
        public static List <PrintPageLayerInfo> LoadMyStandard()
        {
            //MyStandard値のロード
            string strMyStdInfo = Properties.Settings.Default.MyStandardPrintPageLayerString;

            MbeMyStd[] myStdInfoArray = MbeMyStd.LoadMyStdInfoArray(strMyStdInfo);

            List <PrintPageLayerInfo> infoList = new List <PrintPageLayerInfo>();

            foreach (MbeMyStd info in myStdInfoArray)
            {
                infoList.Add((PrintPageLayerInfo)info);
            }
            return(infoList);
        }
コード例 #7
0
        private void SaveMyStandard()
        {
            int count = listBoxLib.Items.Count;

            //libPathNameArray = new string[count];
            LibInfo[] myStdInfoArray = new LibInfo[count];
            for (int i = 0; i < count; i++)
            {
                LibInfo info = new LibInfo();
                info.LibPath = listBoxLib.Items[i].ToString();
                //libPathNameArray[i] = pathname;
                //info.LibPath = pathname;
                myStdInfoArray[i] = info;
            }
            Properties.Settings.Default.MyStandardLibString = MbeMyStd.SaveMyStdInfoArray(myStdInfoArray);
        }
コード例 #8
0
        private void DoOnOK()
        {
            if (!SaveGridInfoSetting())
            {
                return;
            }


            int count = listBoxMyStandard.Items.Count;

            GridInfo[] myStandardGridArray = new GridInfo[count];
            for (int i = 0; i < count; i++)
            {
                myStandardGridArray[i] = (GridInfo)(listBoxMyStandard.Items[i]);
                System.Diagnostics.Debug.WriteLine("SetGridForm-OnOK " + listBoxMyStandard.Items[i].ToString());
            }
            Properties.Settings.Default.MyStandardGridString = MbeMyStd.SaveMyStdInfoArray(myStandardGridArray);
            Properties.Settings.Default.Save();
            this.DialogResult = DialogResult.OK;
        }
コード例 #9
0
        public static MbeMyStd[] LoadMyStdInfoArray(string str)
        {
            LinkedList <MbeMyStd> infoLList = new LinkedList <MbeMyStd>();

            if (str != null)
            {
                StringReader     stringReader = new StringReader(str);
                ReadCE3.RdStatus result       = ReadCE3.RdStatus.NoError;
                try {
                    ReadCE3 readMb3 = new ReadCE3(stringReader);
                    string  str1;
                    string  str2;
                    while (readMb3.GetRecord(out str1, out str2))
                    {
                        if (str1[0] == '-')
                        {
                            break;
                        }
                        else
                        {
                            MbeMyStd info = null;
                            if (str1 == "")
                            {
                                continue;
                            }
                            else if (str1 == "+PAD_INFO")
                            {
                                info = new PadInfo();
                            }
                            else if (str1 == "+PTH_INFO")
                            {
                                info = new PthInfo();
                            }
                            else if (str1 == "+LINE_INFO")
                            {
                                info = new LineInfo();
                            }
                            else if (str1 == "+ARC_INFO")
                            {
                                info = new ArcInfo();
                            }
                            else if (str1 == "+HOLE_INFO")
                            {
                                info = new HoleInfo();
                            }
                            else if (str1 == "+GRID_INFO")
                            {
                                info = new GridInfo();
                            }
                            else if (str1 == "+TEXT_INFO")
                            {
                                info = new TextInfo();
                            }
                            else if (str1 == "+POLYGON_INFO")
                            {
                                info = new PolygonInfo();
                            }
                            else if (str1 == "+LIB_INFO")
                            {
                                info = new LibInfo();
                            }
                            else if (str1 == "+PPAGE_INFO")
                            {
                                info = new PrintPageLayerInfo();
                            }
                            if (info != null)
                            {
                                result = info.RdMb3(readMb3);
                                if (result == ReadCE3.RdStatus.NoError)
                                {
                                    infoLList.AddLast(info);
                                }
                                else
                                {
                                    break;
                                }
                            }
                        }
                    }
                }
                catch {
                }
                finally {
                    stringReader.Dispose();
                }
            }
            MbeMyStd[] infoArray = new MbeMyStd[infoLList.Count];
            int        index     = 0;

            foreach (MbeMyStd info in infoLList)
            {
                infoArray[index] = info;
                index++;
            }

            return(infoArray);
        }