Ejemplo n.º 1
0
        /// <summary>
        /// Update the StatusBar View State
        /// </summary>
        /// <param name="connectionState"></param>
        private void UpdateViewStateDependence(ViewSettings viewState)
        {
            // Update the View Status
            switch (viewState.dataPresentation)
            {
            case 0:    // ASCII
                tbViewState.Text = " ASCII ";

                menuItem_BIN.IsChecked           = false;
                menuItem_DEC.IsChecked           = false;
                menuItem_HEX.IsChecked           = false;
                menuItem_ASCII_Zeichen.IsChecked = true;
                break;

            case 1:    // HEX
                tbViewState.Text = " HEX ";

                menuItem_BIN.IsChecked           = false;
                menuItem_DEC.IsChecked           = false;
                menuItem_ASCII_Zeichen.IsChecked = false;
                menuItem_HEX.IsChecked           = true;
                break;

            case 2:    // DEC
                tbViewState.Text = " DEC ";

                menuItem_BIN.IsChecked           = false;
                menuItem_HEX.IsChecked           = false;
                menuItem_ASCII_Zeichen.IsChecked = false;
                menuItem_DEC.IsChecked           = true;

                break;

            case 3:    // BIN
                tbViewState.Text = " BIN ";

                menuItem_HEX.IsChecked           = false;
                menuItem_ASCII_Zeichen.IsChecked = false;
                menuItem_DEC.IsChecked           = false;
                menuItem_BIN.IsChecked           = true;
                break;
            }


            // Set the TimeStamo View
            if (viewState.showTimeStamp)
            {
                menuItem_TimeStamp.IsChecked = true;
            }
            else
            {
                menuItem_TimeStamp.IsChecked = false;
            }


            // Update the Toolbar Color for the Send and Receive View
            tbSendColor.Foreground   = new SolidColorBrush(settings.viewSettings.sendColor);
            tbReciveColor.Foreground = new SolidColorBrush(settings.viewSettings.receiveColor);

            // Reloasd the Msg Viewer
            reloadRtb();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor to set the Settings from the Readed File
 /// </summary>
 /// <param name="info"></param>
 /// <param name="ctxt"></param>
 public ObjectToSerialize(SerializationInfo info, StreamingContext ctxt)
 {
     this.connectionSettings  = (ConnectionSettings)info.GetValue("connectionSettings", typeof(ConnectionSettings));
     this.applicationSettings = (ApplicationSettings)info.GetValue("applicationSettings", typeof(ApplicationSettings));
     this.viewSettings        = (ViewSettings)info.GetValue("viewSettings", typeof(ViewSettings));
 }