Ejemplo n.º 1
0
        private void Export_UserInfo()
        {
            Dlg_SaveFile.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\CANStream\\Record User Information";

            if (Dlg_SaveFile.ShowDialog().Equals(DialogResult.OK))
            {
                CS_RecordUserInfoCollection oInfoCollection = new CS_RecordUserInfoCollection();

                foreach (DataGridViewRow oRow in Grid_UserInfos.Rows)
                {
                    if (!(oRow.Cells[0].Value == null))
                    {
                        CS_RecordUserInfo sInfo = new CS_RecordUserInfo();
                        sInfo.Title = oRow.Cells[0].Value.ToString();

                        if (!(oRow.Cells[1].Value == null))
                        {
                            sInfo.Value = oRow.Cells[1].Value.ToString();
                        }

                        oInfoCollection.Informations.Add(sInfo);
                    }
                }

                oInfoCollection.Write_UserInfoCollection(Dlg_SaveFile.FileName);
            }
        }
Ejemplo n.º 2
0
        private void Cmd_CycleOutFileClick(object sender, EventArgs e)
        {
            Dlg_SaveFile.FileName         = "";
            Dlg_SaveFile.Filter           = "CAN Strem cycle|*.csc";
            Dlg_SaveFile.InitialDirectory = CANStreamTools.MyDocumentPath + "\\CANStream\\Cycles";

            if (Dlg_SaveFile.ShowDialog().Equals(DialogResult.OK))
            {
                Txt_CycleOut.Text = Dlg_SaveFile.FileName;
            }
        }
Ejemplo n.º 3
0
        private string SetLibraryFilePath()
        {
            Dlg_SaveFile.FileName         = oActiveLibrary.Name + ".cbs";
            Dlg_SaveFile.Filter           = "CANStream Built-in Signals | *.cbs";
            Dlg_SaveFile.InitialDirectory = CANStreamTools.MyDocumentPath + "\\CANStream\\Built-In Signals libraries";

            if (Dlg_SaveFile.ShowDialog().Equals(DialogResult.OK))
            {
                return(Dlg_SaveFile.FileName);
            }

            return("");
        }