示例#1
0
        public void LoadFromConfiguration()
        {
            Properties.Settings settings = Properties.Settings.Default;

            if ( Id ==  "POST0" )
            {
                Index = 0;
                Name = settings.Post0Name;
                Id = settings.Post0Post;
                Caption = settings.Post0Caption;
                Enabled = settings.Post0Enabled;
                Visible = settings.Post0Visible;
                BtnImageOn = settings.Post0BtnImgOn;
                BtnImageOff = settings.Post0BtnImgOff;
                PrintCopies = (int)settings.Post0PrintCopies;
                PrintHeader = settings.Post0PrintHeader;
            }
            else if (Id == "POST1")
            {
                Index = 1;
                Name = settings.Post1Name;
                Id = settings.Post1Post;
                Caption = settings.Post1Caption;
                Enabled = settings.Post1Enabled;
                Visible = settings.Post1Visible;
                BtnImageOn = settings.Post1BtnImgOn;
                BtnImageOff = settings.Post1BtnImgOff;
                PrintCopies = (int)settings.Post1PrintCopies;
                PrintHeader = settings.Post1PrintHeader;
            }
            else if (Id == "POST2")
            {
                Index = 2;
                Name = settings.Post2Name;
                Id = settings.Post2Post;
                Caption = settings.Post2Caption;
                Enabled = settings.Post2Enabled;
                Visible = settings.Post2Visible;
                BtnImageOn = settings.Post2BtnImgOn;
                BtnImageOff = settings.Post2BtnImgOff;
                PrintCopies = (int)settings.Post2PrintCopies;
                PrintHeader = settings.Post2PrintHeader;
            }
            else if (Id == "POST3")
            {
                Index = 3;
                Name = settings.Post3Name;
                Id = settings.Post3Post;
                Caption = settings.Post3Caption;
                Enabled = settings.Post3Enabled;
                Visible = settings.Post3Visible;
                BtnImageOn = settings.Post3BtnImgOn;
                BtnImageOff = settings.Post3BtnImgOff;
                PrintCopies = (int)settings.Post3PrintCopies;
                PrintHeader = settings.Post3PrintHeader;
            }
            else if (Id == "POST4")
            {
                Index = 4;
                Name = settings.Post4Name;
                Id = settings.Post4Post;
                Caption = settings.Post4Caption;
                Enabled = settings.Post4Enabled;
                Visible = settings.Post4Visible;
                BtnImageOn = settings.Post4BtnImgOn;
                BtnImageOff = settings.Post4BtnImgOff;
                PrintCopies = (int)settings.Post4PrintCopies;
                PrintHeader = settings.Post4PrintHeader;
            }
            else if (Id == "POST5")
            {
                Index = 5;
                Name = settings.Post5Name;
                Id = settings.Post5Post;
                Caption = settings.Post5Caption;
                Enabled = settings.Post5Enabled;
                Visible = settings.Post5Visible;
                BtnImageOn = settings.Post5BtnImgOn;
                BtnImageOff = settings.Post5BtnImgOff;
                PrintCopies = (int)settings.Post5PrintCopies;
                PrintHeader = settings.Post5PrintHeader;
            }
            else if (Id == "POST6")
            {
                Index = 6;
                Name = settings.Post6Name;
                Id = settings.Post6Post;
                Caption = settings.Post6Caption;
                Enabled = settings.Post6Enabled;
                Visible = settings.Post6Visible;
                BtnImageOn = settings.Post6BtnImgOn;
                BtnImageOff = settings.Post6BtnImgOff;
                PrintCopies = (int)settings.Post6PrintCopies;
                PrintHeader = settings.Post6PrintHeader;
            }
            else if (Id == "POST7")
            {
                Index = 7;
                Name = settings.Post7Name;
                Id = settings.Post7Post;
                Caption = settings.Post7Caption;
                Enabled = settings.Post7Enabled;
                Visible = settings.Post7Visible;
                BtnImageOn = settings.Post7BtnImgOn;
                BtnImageOff = settings.Post7BtnImgOff;
                PrintCopies = (int)settings.Post7PrintCopies;
                PrintHeader = settings.Post7PrintHeader;
            }
            else if (Id == "POST8")
            {
                Index = 8;
                Name = settings.Post8Name;
                Id = settings.Post8Post;
                Caption = settings.Post8Caption;
                Enabled = settings.Post8Enabled;
                Visible = settings.Post8Visible;
                BtnImageOn = settings.Post8BtnImgOn;
                BtnImageOff = settings.Post8BtnImgOff;
                PrintCopies = (int)settings.Post8PrintCopies;
                PrintHeader = settings.Post8PrintHeader;
            }
            else if (Id == "POST9")
            {
                Index = 9;
                Name = settings.Post9Name;
                Id = settings.Post9Post;
                Caption = settings.Post9Caption;
                Enabled = settings.Post9Enabled;
                Visible = settings.Post9Visible;
                BtnImageOn = settings.Post9BtnImgOn;
                BtnImageOff = settings.Post9BtnImgOff;
                PrintCopies = (int)settings.Post9PrintCopies;
                PrintHeader = settings.Post9PrintHeader;
            }
        }
示例#2
0
        public void SaveToConfiguration()
        {
            Properties.Settings settings = Properties.Settings.Default;

            if (Id == "POST0")
            {
                settings.Post0Name = Name;
                //settings.Post0Post = Id;
                settings.Post0Caption = Caption;
                settings.Post0RunText = RunText;
                settings.Post0Visible = Visible;
                settings.Post0PlayAudio = PlayAudio;
            }
            else if (Id == "POST1")
            {
                settings.Post1Name = Name;
                //settings.Post1Post = Id;
                settings.Post1Caption = Caption;
                settings.Post1RunText = RunText;
                settings.Post1Visible = Visible;
                settings.Post1PlayAudio = PlayAudio;
            }
            else if (Id == "POST2")
            {
                settings.Post2Name = Name;
                //settings.Post2Post = Id;
                settings.Post2Caption = Caption;
                settings.Post2RunText = RunText;
                settings.Post2Visible = Visible;
                settings.Post2PlayAudio = PlayAudio;
            }
            else if (Id == "POST3")
            {
                settings.Post3Name = Name;
                //settings.Post3Post = Id;
                settings.Post3Caption = Caption;
                settings.Post3RunText = RunText;
                settings.Post3Visible = Visible;
                settings.Post3PlayAudio = PlayAudio;
            }
            else if (Id == "POST4")
            {
                settings.Post4Name = Name;
                //settings.Post4Post = Id;
                settings.Post4Caption = Caption;
                settings.Post4RunText = RunText;
                settings.Post4Visible = Visible;
                settings.Post4PlayAudio = PlayAudio;
            }
            else if (Id == "POST5")
            {
                settings.Post5Name = Name;
                //settings.Post5Post = Id;
                settings.Post5Caption = Caption;
                settings.Post5RunText = RunText;
                settings.Post5Visible = Visible;
                settings.Post5PlayAudio = PlayAudio;
            }
            else if(Id == "POST6")
            {
                settings.Post6Name = Name;
                //settings.Post6Post = Id;
                settings.Post6Caption = Caption;
                settings.Post6RunText = RunText;
                settings.Post6Visible = Visible;
                settings.Post6PlayAudio = PlayAudio;
            }
            else if (Id == "POST7")
            {
                settings.Post7Name = Name;
                //settings.Post7Post = Id;
                settings.Post7Caption = Caption;
                settings.Post7RunText = RunText;
                settings.Post7Visible = Visible;
                settings.Post7PlayAudio = PlayAudio;
            }
            else if (Id == "POST8")
            {
                settings.Post8Name = Name;
                //settings.Post8Post = Id;
                settings.Post8Caption = Caption;
                settings.Post8RunText = RunText;
                settings.Post8Visible = Visible;
                settings.Post8PlayAudio = PlayAudio;
            }
            else if (Id == "POST9")
            {
                settings.Post9Name = Name;
                //settings.Post9Post = Id;
                settings.Post9Caption = Caption;
                settings.Post9RunText = RunText;
                settings.Post9Visible = Visible;
                settings.Post9PlayAudio = PlayAudio;
            }
            else
            {
                // do nothing
            }
        }
示例#3
0
        public void SaveToConfiguration()
        {
            Properties.Settings settings = Properties.Settings.Default;

            if (Id == "POST0")
            {
                settings.Post0Name = Name;
                //settings.Post0Post = Id;
                settings.Post0Caption = Caption;
                settings.Post0Enabled = Enabled;
                settings.Post0Visible = Visible;
                settings.Post0BtnImgOn = BtnImageOn;
                settings.Post0BtnImgOff = BtnImageOff;
                settings.Post0PrintCopies = (short)PrintCopies;
                settings.Post0PrintHeader = PrintHeader;
            }
            else if (Id == "POST1")
            {
                settings.Post1Name = Name;
                //settings.Post1Post = Id;
                settings.Post1Caption = Caption;
                settings.Post1Enabled = Enabled;
                settings.Post1Visible = Visible;
                settings.Post1BtnImgOn = BtnImageOn;
                settings.Post1BtnImgOff = BtnImageOff;
                settings.Post1PrintCopies = (short)PrintCopies;
                settings.Post1PrintHeader = PrintHeader;
            }
            else if (Id == "POST2")
            {
                settings.Post2Name = Name;
                //settings.Post2Post = Id;
                settings.Post2Caption = Caption;
                settings.Post2Enabled = Enabled;
                settings.Post2Visible = Visible;
                settings.Post2BtnImgOn = BtnImageOn;
                settings.Post2BtnImgOff = BtnImageOff;
                settings.Post2PrintCopies = (short)PrintCopies;
                settings.Post2PrintHeader = PrintHeader;
            }
            else if (Id == "POST3")
            {
                settings.Post3Name = Name;
                //settings.Post3Post = Id;
                settings.Post3Caption = Caption;
                settings.Post3Enabled = Enabled;
                settings.Post3Visible = Visible;
                settings.Post3BtnImgOn = BtnImageOn;
                settings.Post3BtnImgOff = BtnImageOff;
                settings.Post3PrintCopies = (short)PrintCopies;
                settings.Post3PrintHeader = PrintHeader;
            }
            else if (Id == "POST4")
            {
                settings.Post4Name = Name;
                //settings.Post4Post = Id;
                settings.Post4Caption = Caption;
                settings.Post4Enabled = Enabled;
                settings.Post4Visible = Visible;
                settings.Post4BtnImgOn = BtnImageOn;
                settings.Post4BtnImgOff = BtnImageOff;
                settings.Post4PrintCopies = (short)PrintCopies;
                settings.Post4PrintHeader = PrintHeader;
            }
            else if (Id == "POST5")
            {
                settings.Post5Name = Name;
                //settings.Post5Post = Id;
                settings.Post5Caption = Caption;
                settings.Post5Enabled = Enabled;
                settings.Post5Visible = Visible;
                settings.Post5BtnImgOn = BtnImageOn;
                settings.Post5BtnImgOff = BtnImageOff;
                settings.Post5PrintCopies = (short)PrintCopies;
                settings.Post5PrintHeader = PrintHeader;
            }
            else if(Id == "POST6")
            {
                settings.Post6Name = Name;
                //settings.Post6Post = Id;
                settings.Post6Caption = Caption;
                settings.Post6Enabled = Enabled;
                settings.Post6Visible = Visible;
                settings.Post6BtnImgOn = BtnImageOn;
                settings.Post6BtnImgOff = BtnImageOff;
                settings.Post6PrintCopies = (short)PrintCopies;
                settings.Post6PrintHeader = PrintHeader;
            }
            else if (Id == "POST7")
            {
                settings.Post7Name = Name;
                //settings.Post7Post = Id;
                settings.Post7Caption = Caption;
                settings.Post7Enabled = Enabled;
                settings.Post7Visible = Visible;
                settings.Post7BtnImgOn = BtnImageOn;
                settings.Post7BtnImgOff = BtnImageOff;
                settings.Post7PrintCopies = (short)PrintCopies;
                settings.Post7PrintHeader = PrintHeader;
            }
            else if (Id == "POST8")
            {
                settings.Post8Name = Name;
                //settings.Post8Post = Id;
                settings.Post8Caption = Caption;
                settings.Post8Enabled = Enabled;
                settings.Post8Visible = Visible;
                settings.Post8BtnImgOn = BtnImageOn;
                settings.Post8BtnImgOff = BtnImageOff;
                settings.Post8PrintCopies = (short)PrintCopies;
                settings.Post8PrintHeader = PrintHeader;
            }
            else if (Id == "POST9")
            {
                settings.Post9Name = Name;
                //settings.Post9Post = Id;
                settings.Post9Caption = Caption;
                settings.Post9Enabled = Enabled;
                settings.Post9Visible = Visible;
                settings.Post9BtnImgOn = BtnImageOn;
                settings.Post9BtnImgOff = BtnImageOff;
                settings.Post9PrintCopies = (short)PrintCopies;
                settings.Post9PrintHeader = PrintHeader;
            }
        }
示例#4
0
        public void LoadFromConfiguration()
        {
            Properties.Settings settings = Properties.Settings.Default;

            if ( Id ==  "POST0" )
            {
                Index = 0;
                Name = settings.Post0Name;
                Id = settings.Post0Post;
                Caption = settings.Post0Caption;
                RunText = settings.Post0RunText;
                Visible = settings.Post0Visible;
                PlayAudio = settings.Post0PlayAudio;
            }
            else if (Id == "POST1")
            {
                Index = 1;
                Name = settings.Post1Name;
                Id = settings.Post1Post;
                Caption = settings.Post1Caption;
                RunText = settings.Post1RunText;
                Visible = settings.Post1Visible;
                PlayAudio = settings.Post1PlayAudio;
            }
            else if (Id == "POST2")
            {
                Index = 2;
                Name = settings.Post2Name;
                Id = settings.Post2Post;
                Caption = settings.Post2Caption;
                RunText = settings.Post2RunText;
                Visible = settings.Post2Visible;
                PlayAudio = settings.Post2PlayAudio;
            }
            else if (Id == "POST3")
            {
                Index = 3;
                Name = settings.Post3Name;
                Id = settings.Post3Post;
                Caption = settings.Post3Caption;
                RunText = settings.Post3RunText;
                Visible = settings.Post3Visible;
                PlayAudio = settings.Post3PlayAudio;
            }
            else if (Id == "POST4")
            {
                Index = 4;
                Name = settings.Post4Name;
                Id = settings.Post4Post;
                Caption = settings.Post4Caption;
                RunText = settings.Post4RunText;
                Visible = settings.Post4Visible;
                PlayAudio = settings.Post4PlayAudio;
            }
            else if (Id == "POST5")
            {
                Index = 5;
                Name = settings.Post5Name;
                Id = settings.Post5Post;
                Caption = settings.Post5Caption;
                RunText = settings.Post5RunText;
                Visible = settings.Post5Visible;
                PlayAudio = settings.Post5PlayAudio;
            }
            else if (Id == "POST6")
            {
                Index = 6;
                Name = settings.Post6Name;
                Id = settings.Post6Post;
                Caption = settings.Post6Caption;
                RunText = settings.Post6RunText;
                Visible = settings.Post6Visible;
                PlayAudio = settings.Post6PlayAudio;
            }
            else if (Id == "POST7")
            {
                Index = 7;
                Name = settings.Post7Name;
                Id = settings.Post7Post;
                Caption = settings.Post7Caption;
                RunText = settings.Post7RunText;
                Visible = settings.Post7Visible;
                PlayAudio = settings.Post7PlayAudio;
            }
            else if (Id == "POST8")
            {
                Index = 8;
                Name = settings.Post8Name;
                Id = settings.Post8Post;
                Caption = settings.Post8Caption;
                RunText = settings.Post8RunText;
                Visible = settings.Post8Visible;
                PlayAudio = settings.Post8PlayAudio;
            }
            else if (Id == "POST9")
            {
                Index = 9;
                Name = settings.Post9Name;
                Id = settings.Post9Post;
                Caption = settings.Post9Caption;
                RunText = settings.Post9RunText;
                Visible = settings.Post9Visible;
                PlayAudio = settings.Post9PlayAudio;
            }
            else
            {
                Index = -1;
                Name = "INVALID";
                Id = "";
                Caption = "";
                RunText = "";
                Visible = false;
                PlayAudio = false;
            }
        }