Example #1
0
 public void StoreValues(Data data, string path)
 {
     data.SetValue(@"" + path + @"Duplex", Duplex.ToString());
     data.SetValue(@"" + path + @"Enabled", Enabled.ToString());
     data.SetValue(@"" + path + @"PrinterName", Data.EscapeString(PrinterName));
     data.SetValue(@"" + path + @"SelectPrinter", SelectPrinter.ToString());
 }
Example #2
0
        // Convert this object into a string.
        public override String ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("[PrinterSettings ");
            builder.Append(PrinterName);
            builder.Append(" Copies=");
            builder.Append(Copies.ToString());
            builder.Append(" Collate=");
            builder.Append(Collate.ToString());
            builder.Append(" Duplex=");
            builder.Append(Duplex.ToString());
            builder.Append(" FromPage=");
            builder.Append(FromPage.ToString());
            builder.Append(" LandscapeAngle=");
            builder.Append(LandscapeAngle.ToString());
            builder.Append(" MaximumCopies=");
            builder.Append(MaximumCopies.ToString());
            builder.Append(" OutputPort=");
            builder.Append(ToolkitPrinter.OutputPort.ToString());
            builder.Append(" ToPage=");
            builder.Append(ToPage.ToString());
            builder.Append(']');
            return(builder.ToString());
        }
Example #3
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Duplex=" + Duplex.ToString());
            sb.AppendLine("Enabled=" + Enabled.ToString());
            sb.AppendLine("PrinterName=" + PrinterName.ToString());
            sb.AppendLine("SelectPrinter=" + SelectPrinter.ToString());

            return(sb.ToString());
        }
Example #4
0
        private void WriteKKCSV(string KKCSVName)
        {
            // save the current settings to KK.csv
            List <string> lines = new List <string>();        // create a List<string> to hold all the output lines

            // each line of the output file, in output order
            lines.Add("Users Call," + Your_call);
            lines.Add("KKDevice," + ((int)KKDevice).ToString());
            lines.Add("Band," + BandSelect.Text);
            lines.Add("Sample Rate," + SampleRate);
            lines.Add("Step Size," + stepSize.Text);
            lines.Add("Mode," + Mode.Text);
            lines.Add("Volume," + VolumeTrackBar.Value);
            lines.Add("Bandwidth," + BandwidthTrackBar.Value);
            lines.Add("Last Freq 160m," + set_frequency_160);
            lines.Add("Last Freq 80m," + set_frequency_80);
            lines.Add("Last Freq 40m," + set_frequency_40);
            lines.Add("Last Freq 30m," + set_frequency_30);
            lines.Add("Last Freq 20m," + set_frequency_20);
            lines.Add("Last Freq 17m," + set_frequency_17);
            lines.Add("Last Freq 15m," + set_frequency_15);
            lines.Add("Last Freq 12m," + set_frequency_12);
            lines.Add("Last Freq 10m," + set_frequency_10);
            lines.Add("Last Freq 6m," + set_frequency_6);
            lines.Add("Last Freq GC," + set_frequency_GC);
            lines.Add("Last frequency," + trackBarSetFrequency.Value);
            // we need to store the following controls as true or false, first we convert from bool to a string
            lines.Add("ANF," + (ANF.Checked).ToString());
            lines.Add("NR," + (NR.Checked).ToString());
            lines.Add("NB1," + (NB1.Checked).ToString());
            lines.Add("NB2," + (NB2.Checked).ToString());
            lines.Add("NB1 Threshold," + rcvr.BlockNBThreshold.ToString(nfi)); // use nfi to make floats region independent
            lines.Add("NB2 Threshold," + rcvr.AveNBThreshold.ToString(nfi));
            lines.Add("Bandscope Average," + rcvr.PowerSpectrumAveragingOn.ToString());
            lines.Add("Bandscope Smooth," + rcvr.PowerSpectrumSmoothingFactor.ToString(nfi));
            lines.Add("Rate," + Rate.ToString());
            // save the preamp setting for each band
            lines.Add("Preamp 160," + Preamp_160.ToString());
            lines.Add("Preamp 80," + Preamp_80.ToString());
            lines.Add("Preamp 40," + Preamp_40.ToString());
            lines.Add("Preamp 30," + Preamp_30.ToString());
            lines.Add("Preamp 20," + Preamp_20.ToString());
            lines.Add("Preamp 17," + Preamp_17.ToString());
            lines.Add("Preamp 15," + Preamp_15.ToString());
            lines.Add("Preamp 12," + Preamp_12.ToString());
            lines.Add("Preamp 10," + Preamp_10.ToString());
            lines.Add("Preamp 6," + Preamp_6.ToString());
            lines.Add("Preamp GC," + Preamp_GC.ToString());
            // end of original kk.csv file. beginning of values that LookupKKCSVValue should be used on
            lines.Add("ANFAdaptiveFilterSize," + ANFAdaptiveFilterSize.ToString(nfi));
            lines.Add("ANFDelay," + ANFDelay.ToString(nfi));
            lines.Add("ANFAdaptationRate," + ANFAdaptationRate.ToString(nfi));
            lines.Add("ANFLeakage," + ANFLeakage.ToString(nfi));
            lines.Add("NRAdaptiveFilterSize," + NRAdaptiveFilterSize.ToString(nfi));
            lines.Add("NRDelay," + NRDelay.ToString(nfi));
            lines.Add("NRAdaptationRate," + NRAdaptationRate.ToString(nfi));
            lines.Add("NRLeakage," + NRLeakage.ToString(nfi));
            lines.Add("Bandscope Grid Max," + GridMax.ToString(nfi));
            lines.Add("Bandscope Grid Min," + GridMin.ToString(nfi));
            lines.Add("Bandscope Grid Step," + GridStep.ToString(nfi));

            lines.Add("AGC Speed," + AGCSpeed.Text);
            lines.Add("AGC Fixed Gain," + AGCFixedGainDB.ToString(nfi));
            lines.Add("AGC Hang Threshold," + AGCHangThreshold.ToString(nfi));
            lines.Add("AGC Max Gain," + AGCMaximumGainDB.ToString(nfi));
            lines.Add("AGC Slope," + AGCSlope.ToString(nfi));
            lines.Add("AGC Attack Time," + UserAGCAttackTime.ToString(nfi)); // only variable for 'user' AGC
            lines.Add("AGC Decay Time," + UserAGCDecayTime.ToString(nfi));   // only variable for 'user' AGC
            lines.Add("AGC Hang Time," + UserAGCHangTime.ToString(nfi));     // only variable for 'user' AGC

            lines.Add("WaterfallHigh," + WaterfallHighThreshold.ToString(nfi));
            lines.Add("WaterfallLow," + WaterfallLowThreshold.ToString(nfi));
            lines.Add("WaterFall AGC," + WaterfallAGC.ToString(nfi));

            lines.Add("Squelch level," + Squelch_level.Value.ToString(nfi));

            lines.Add("Hermes," + Hermes.ToString(nfi));
            lines.Add("PennyLane," + PennyLane.ToString(nfi));
            lines.Add("Penny Present," + PenneyPresent.ToString(nfi));
            lines.Add("Mic Gain 20dB," + MicGain20dB.ToString(nfi));
            lines.Add("Atlas 10MHz," + Atlas10MHz.ToString(nfi));
            lines.Add("Mercury 10MHz," + Mercury10MHz.ToString(nfi));
            lines.Add("Penelope 10MHz," + Penelope10MHz.ToString(nfi));
            lines.Add("Excalibur Present," + Excalibur.ToString(nfi));

            lines.Add("Tx Filter High," + TxFilterHigh.ToString(nfi));
            lines.Add("Tx Filter Low," + TxFilterLow.ToString(nfi));

            lines.Add("Drive Level," + DriveLevel.Value.ToString(nfi));

            lines.Add("Band Gain 160m," + Gain160m.ToString(nfi));
            lines.Add("Band Gain 80m," + Gain80m.ToString(nfi));
            lines.Add("Band Gain 60m," + Gain60m.ToString(nfi));
            lines.Add("Band Gain 40m," + Gain40m.ToString(nfi));
            lines.Add("Band Gain 30m," + Gain30m.ToString(nfi));
            lines.Add("Band Gain 20m," + Gain20m.ToString(nfi));
            lines.Add("Band Gain 17m," + Gain17m.ToString(nfi));
            lines.Add("Band Gain 15m," + Gain15m.ToString(nfi));
            lines.Add("Band Gain 12m," + Gain12m.ToString(nfi));
            lines.Add("Band Gain 10m," + Gain10m.ToString(nfi));
            lines.Add("Band Gain 6m," + Gain6m.ToString(nfi));

            lines.Add("Full Duplex," + Duplex.ToString(nfi));
            lines.Add("Only Tx on PTT," + OnlyTxOnPTT.ToString(nfi));

            lines.Add("Tune Level," + TuneLevel.ToString(nfi));
            lines.Add("CWPitch," + CWPitch.ToString(nfi));

            lines.Add("Penny OC Enable," + PennyOC.ToString(nfi));
            lines.Add("Penny OC 160mTx," + Penny160mTxOC.ToString(nfi));
            lines.Add("Penny OC 80mTx," + Penny80mTxOC.ToString(nfi));
            lines.Add("Penny OC 60mTx," + Penny60mTxOC.ToString(nfi));
            lines.Add("Penny OC 40mTx," + Penny40mTxOC.ToString(nfi));
            lines.Add("Penny OC 30mTx," + Penny30mTxOC.ToString(nfi));
            lines.Add("Penny OC 20mTx," + Penny20mTxOC.ToString(nfi));
            lines.Add("Penny OC 17mTx," + Penny17mTxOC.ToString(nfi));
            lines.Add("Penny OC 15mTx," + Penny15mTxOC.ToString(nfi));
            lines.Add("Penny OC 12mTx," + Penny12mTxOC.ToString(nfi));
            lines.Add("Penny OC 10mTx," + Penny10mTxOC.ToString(nfi));
            lines.Add("Penny OC 6mTx," + Penny6mTxOC.ToString(nfi));

            lines.Add("Penny OC 160mRx," + Penny160mRxOC.ToString(nfi));
            lines.Add("Penny OC 80mRx," + Penny80mRxOC.ToString(nfi));
            lines.Add("Penny OC 60mRx," + Penny60mRxOC.ToString(nfi));
            lines.Add("Penny OC 40mRx," + Penny40mRxOC.ToString(nfi));
            lines.Add("Penny OC 30mRx," + Penny30mRxOC.ToString(nfi));
            lines.Add("Penny OC 20mRx," + Penny12mRxOC.ToString(nfi));
            lines.Add("Penny OC 17mRx," + Penny17mRxOC.ToString(nfi));
            lines.Add("Penny OC 15mRx," + Penny15mRxOC.ToString(nfi));
            lines.Add("Penny OC 12mRx," + Penny12mRxOC.ToString(nfi));
            lines.Add("Penny OC 10mRx," + Penny10mRxOC.ToString(nfi));
            lines.Add("Penny OC 6mRx," + Penny6mRxOC.ToString(nfi));

            lines.Add("DelayRF," + DelayRF.ToString(nfi));
            lines.Add("DelayPTT," + DelayPTT.ToString(nfi));

            lines.Add("FM deviation," + FM_deviation.ToString(nfi));
            lines.Add("Speech Processor," + chkClipper.Checked.ToString(nfi));
            lines.Add("Processor Gain," + ProcessorGain.Value.ToString(nfi));
            lines.Add("Bass Cut," + chkBassCut.Checked.ToString(nfi));

            lines.Add("VOX On," + chkVOX.Checked.ToString(nfi));
            lines.Add("VOX Level," + VOXLevel.Value.ToString(nfi));
            VOXHang = (int)VOXHangTime.Value;
            lines.Add("VOX Hang," + VOXHang.ToString(nfi));
            lines.Add("Mic Gain," + MicrophoneGain.Value.ToString(nfi));
            lines.Add("Processor Gain," + ProcessorGain.Value.ToString(nfi));
            lines.Add("Line In," + LineIn.ToString(nfi));
            lines.Add("Last MAC," + MetisMAC);
            lines.Add("Mic AGC," + chkMicAGC.Checked.ToString(nfi));
            lines.Add("Noise Gate," + chkNoiseGate.Checked.ToString(nfi));
            lines.Add("Noise Gate Level," + NoiseGateLevel.Value.ToString(nfi));
            lines.Add("Alex," + Alex.ToString(nfi));
            lines.Add("Apollo," + Apollo.ToString(nfi));

            lines.Add("Alex160mState," + Alex160mState.ToString(nfi));
            lines.Add("Alex80mState," + Alex80mState.ToString(nfi));
            lines.Add("Alex60mState," + Alex60mState.ToString(nfi));
            lines.Add("Alex40mState," + Alex40mState.ToString(nfi));
            lines.Add("Alex30mState," + Alex30mState.ToString(nfi));
            lines.Add("Alex20mState," + Alex20mState.ToString(nfi));
            lines.Add("Alex17mState," + Alex17mState.ToString(nfi));
            lines.Add("Alex15mState," + Alex15mState.ToString(nfi));
            lines.Add("Alex12mState," + Alex12mState.ToString(nfi));
            lines.Add("Alex10mState," + Alex10mState.ToString(nfi));
            lines.Add("Alex6mState," + Alex6mState.ToString(nfi));
            lines.Add("AlexGCState," + AlexGCState.ToString(nfi));
            lines.Add("SkipVersionCheck," + SkipVersionCheck.ToString(nfi));               // convert bool to 'true'/'false'
            lines.Add("Allow16kWidebandSamples," + Allow16kWidebandSamples.ToString(nfi)); // convert bool to 'true'/'false'
            lines.Add("DoFastEthernetConnect," + DoFastEthernetConnect.ToString(nfi));     // convert bool to 'true'/'false'
            lines.Add("EthernetHostIPAddress," + EthernetHostIPAddress.ToString(nfi));     // string
            lines.Add("Metis_IP_address," + Metis_IP_address.ToString(nfi));               // string

            // write all the lines
            File.WriteAllLines(KKCSVName, lines.ToArray());
        }