Inheritance: DevExpress.XtraEditors.XtraForm
Example #1
0
 private void btnAddNoteToProject_ItemClick(object sender, ItemClickEventArgs e)
 {
     frmChangeNote newNote = new frmChangeNote();
     newNote.ShowDialog();
     if (newNote.Note != string.Empty)
     {
         if (Tools.Instance.m_CurrentWorkingProject != string.Empty)
         {
             Tools.Instance.m_ProjectLog.WriteLogbookEntry(LogbookEntryType.Note, newNote.Note);
         }
     }
 }
Example #2
0
        void tabdet_onSymbolSave(object sender, MapViewerEx.SaveSymbolEventArgs e)
        {
            if (sender is MapViewerEx)
            {
                // juiste filename kiezen
                MapViewerEx tabdet = (MapViewerEx)sender;
                string note = string.Empty;
                if (m_appSettings.RequestProjectNotes && Tools.Instance.m_CurrentWorkingProject != "")
                {
                    //request a small note from the user in which he/she can denote a description of the change
                    frmChangeNote changenote = new frmChangeNote();
                    changenote.ShowDialog();
                    note = changenote.Note;
                }

                SaveDataIncludingSyncOption(e.Filename, e.SymbolName, e.SymbolAddress, e.SymbolLength, e.SymbolDate, true, note);

            }
        }
Example #3
0
 void axis_Save(object sender, EventArgs e)
 {
     if (sender is ctrlAxisEditor)
     {
         ctrlAxisEditor editor = (ctrlAxisEditor)sender;
         // recalculate the values back and store it in the file at the correct location
         float[] newvalues = editor.GetData();
         // well.. recalculate the data based on these new values
         //editor.CorrectionFactor
         int[] iValues = new int[newvalues.Length];
         // calculate back to integer values
         for (int i = 0; i < newvalues.Length; i++)
         {
             int iValue = Convert.ToInt32(Convert.ToDouble(newvalues.GetValue(i))/editor.CorrectionFactor);
             iValues.SetValue(iValue, i);
         }
         byte[] barr = new byte[iValues.Length * 2];
         int bCount = 0;
         for (int i = 0; i < iValues.Length; i++)
         {
             int iVal = (int)iValues.GetValue(i);
             byte b1 = (byte)((iVal & 0x00FF00) / 256);
             byte b2 = (byte)(iVal & 0x0000FF);
             barr[bCount++] = b1;
             barr[bCount++] = b2;
         }
         string note = string.Empty;
         if (m_appSettings.RequestProjectNotes && Tools.Instance.m_CurrentWorkingProject != "")
         {
             //request a small note from the user in which he/she can denote a description of the change
             frmChangeNote changenote = new frmChangeNote();
             changenote.ShowDialog();
             note = changenote.Note;
         }
         SaveAxisDataIncludingSyncOption(editor.AxisAddress, barr.Length, barr, Tools.Instance.m_currentfile, true, note);
         // and we need to update mapviewers maybe?
         UpdateOpenViewers(Tools.Instance.m_currentfile);
     }
 }