Exemplo n.º 1
0
        void MakeOkCancel()
        {
            MyFunc.Geminus <int> Sizes = MyFunc.Set(36, 5);
            Field.Array  = new char[Sizes.Secundus, Sizes.Primis];
            Field.Koords = MyFunc.Set(MyFunc.AlignString(Sizes.Primis, Global.Sizes.Primis, 1), MyFunc.AlignString(Sizes.Secundus, Global.Sizes.Secundus, 1));

            MyFunc.FillArray(Field.Array, ' ');

            string[] Names = { "YES", "NO" };
            MyFunc.CopyStringToArray(MyFunc.Set(MyFunc.AlignString(Names[0].Length, Sizes.Primis / 2, 1), 2), Names[0], Field.Array, true);
            MyFunc.CopyStringToArray(MyFunc.Set(MyFunc.AlignString(Names[1].Length, Sizes.Primis / 2, 1) + 18, 2), Names[1], Field.Array, true);

            Label.SomeString = "";
            Label.Koords     = MyFunc.Set(2, 0);

            Global.FillBroders(Field.Array);
            //MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, Field.Array, true);

            HorizKoords    = new MyFunc.Quadrupla <int> [2];
            HorizKoords[0] = MyFunc.Set(0, Field.Koords.Primis + 2, Field.Koords.Primis + Sizes.Primis / 2 - 1, Global.Sizes.Primis);
            HorizKoords[1] = MyFunc.Set(0, Field.Koords.Primis + Sizes.Primis / 2 + 1, Field.Koords.Primis + Sizes.Primis - 2, Global.Sizes.Primis);

            CurrentIndex = Field.Koords.Secundus + 2;

            Indexer.SetMinMax(0, 1);
            Indexer.Set(0);
        }
Exemplo n.º 2
0
        void MakeDiskSelecter()
        {
            int Step = 7;

            Drives = DriveInfo.GetDrives();

            MyFunc.Geminus <int> Sizes = MyFunc.Set(Drives.Length * Step + 2, 5);
            Field.Array  = new char[Sizes.Secundus, Sizes.Primis];
            Field.Koords = MyFunc.Set(MyFunc.AlignString(Sizes.Primis, Global.Sizes.Primis, 1), Global.Sizes.Secundus / 4);

            MyFunc.FillArray(Field.Array, ' ');

            Label.SomeString = "";
            Label.Koords     = MyFunc.Set(2, 0);

            Global.FillBroders(Field.Array);

            HorizKoords = new MyFunc.Quadrupla <int> [Drives.Length];
            string TempoName = "";

            for (int i = 0; i < Drives.Length; ++i)
            {
                HorizKoords[i] = MyFunc.Set(0, i * Step + Field.Koords.Primis + 2, (i + 1) * Step + Field.Koords.Primis, Global.Sizes.Primis);

                TempoName += Drives[i].Name[0];
                MyFunc.CopyStringToArray(MyFunc.Set(i * Step + 4, 2), TempoName, Field.Array, true);
                TempoName = "";
            }

            CurrentIndex = Field.Koords.Secundus + 2;

            Indexer.SetMinMax(0, Drives.Length - 1);
            Indexer.Set(0);
        }
Exemplo n.º 3
0
        public void Init(MyFunc.Geminus <int> Koords001, string Name001, int NewSize001)
        {
            if (NewSize001 < 1)
            {
                NewSize001 = 1;
            }
            SomeArray = new char[NewSize001];
            MyFunc.FillArray(SomeArray, ' ');

            Koords = Koords001;

            MyFunc.CopyStringToArray(0, Name001, SomeArray);
        }
Exemplo n.º 4
0
        public void Show(string SomeString001)
        {
            if (Enabled)
            {
                return;
            }
            MyFunc.FillArray(Field, ' ');
            MyFunc.CopyStringToArray(ContentKoords, SomeString001, Field, true);

            Global.FillBroders(Field);
            MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, Field, true);

            MyFunc.Copy(ref Koords, Field, Global.Field);
        }
Exemplo n.º 5
0
        public void Show(ref List<Global.Str_Properties> NewEntaries001, int Min001, int Max001)
        {
            if (NewEntaries001.Any() && NewEntaries001 == null)
            {
                return;
            }

            MyFunc.FillArray(PartesOfContent[0].Array, ' ');
            MyFunc.FillArray(PartesOfContent[1].Array, ' ');
            MyFunc.FillArray(PartesOfContent[2].Array, ' ');
            MyFunc.FillArray(PartesOfContent[3].Array, ' ');

            MyFunc.Geminus<int> TempoPlacer = MyFunc.Set(0, 0);
            MyFunc.Geminus<int> SizePlacer = MyFunc.Set(0, 0);
            MyFunc.Geminus<int> AlignPlacer = MyFunc.Set(0, 0);
            string NameSize;

            for (int i = Min001; i < Max001; ++i)
            { 
                MyFunc.CopyStringToArray(ref TempoPlacer, NewEntaries001[i].Name, PartesOfContent[0].Array, true);
                
                AlignPlacer = TempoPlacer;
                AlignPlacer.Primis = MyFunc.AlignString(NewEntaries001[i].Type.ToString().Length, PartesOfContent[1].Array.GetLength(1), 1);
                if(NewEntaries001[i].Type != Global.Types.LevelUp)
                {
                    MyFunc.CopyStringToArray(ref AlignPlacer, NewEntaries001[i].Type.ToString(), PartesOfContent[1].Array, true);
                }
                AlignPlacer.Primis = MyFunc.AlignString(NewEntaries001[i].Attribute.Length, PartesOfContent[2].Array.GetLength(1), 1);
                MyFunc.CopyStringToArray(ref AlignPlacer, NewEntaries001[i].Attribute, PartesOfContent[2].Array, true);
                if(NewEntaries001[i].Size > 0)
                {
                    SizePlacer = TempoPlacer;
                    NameSize = NewEntaries001[i].Size.ToString();
                    //SizePlacer.Primis = TempoPlacer .Primis + PartesOfContent[3].Array.GetLength(1) - NameSize.Length;
                    SizePlacer.Primis = TempoPlacer.Primis + MyFunc.AlignString(NameSize.Length, PartesOfContent[3].Array.GetLength(1), 2);
                    MyFunc.CopyStringToArray(ref SizePlacer, NameSize, PartesOfContent[3].Array, true);
                }
                
                ++TempoPlacer.Secundus;
            }

            MyFunc.Copy(ref PartesOfContent[0].Koords, PartesOfContent[0].Array, MainField.Array);
            MyFunc.Copy(ref PartesOfContent[1].Koords, PartesOfContent[1].Array, MainField.Array);
            MyFunc.Copy(ref PartesOfContent[2].Koords, PartesOfContent[2].Array, MainField.Array);
            MyFunc.Copy(ref PartesOfContent[3].Koords, PartesOfContent[3].Array, MainField.Array);

            MyFunc.Copy(ref MainField.Koords, MainField.Array, Global.Field);
        }
Exemplo n.º 6
0
        public void Init(MyFunc.Geminus <int> Koords001, int i001, int j001, MyFunc.Geminus <int> ContentKoords001)
        {
            if (i001 < 1)
            {
                i001 = 1;
            }
            if (j001 < 1)
            {
                j001 = 1;
            }
            Field = new char[i001, j001];
            MyFunc.FillArray(Field, ' ');

            Koords        = Koords001;
            ContentKoords = ContentKoords001;
        }
Exemplo n.º 7
0
        static public void Init(int Primis001, int Secundus001)
        {
            Sizes.Primis   = Primis001;
            Sizes.Secundus = Secundus001;

            Field = new char[Sizes.Secundus, Sizes.Primis];
            MyFunc.FillArray(Field, ' ');
            Global.FillBroders(Field);

            Label.SomeString = " MaNorto ";
            Label.Koords     = MyFunc.Set((Global.Sizes.Primis - Label.SomeString.Length) / 2, 0);
            MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, Field, true);

            Attention.Init(MyFunc.Set(2, Global.Sizes.Secundus - 7), 3, Global.Sizes.Primis - 4, MyFunc.Set(2, 1));
            Attention.SetLabel(MyFunc.Set(2, 0), " System Messages ");
            Attention.Enabled = true;
        }
Exemplo n.º 8
0
        static public void FillBroders(char[,] SomeField)
        {
            if (SomeField == null)
            {
                return;
            }

            char[] HoriArray = new char[SomeField.GetLength(1)];
            char[] VertArray = new char[SomeField.GetLength(0)];
            MyFunc.FillArray(HoriArray, '═');
            MyFunc.FillArray(VertArray, '║');

            MyFunc.Copy(MyFunc.Set(0, 0), HoriArray, SomeField, true);
            MyFunc.Copy(MyFunc.Set(0, SomeField.GetLength(0) - 1), HoriArray, SomeField, true);

            MyFunc.Copy(MyFunc.Set(0, 0), VertArray, SomeField, false);
            MyFunc.Copy(MyFunc.Set(SomeField.GetLength(1) - 1, 0), VertArray, SomeField, false);

            SomeField[0, 0] = '╔';
            SomeField[0, SomeField.GetLength(1) - 1] = '╗';
            SomeField[SomeField.GetLength(0) - 1, SomeField.GetLength(1) - 1] = '╝';
            SomeField[SomeField.GetLength(0) - 1, 0] = '╚';
        }
Exemplo n.º 9
0
        public void Show()
        {
            if (!Enabled)
            {
                return;
            }

            if (Data == null)
            {
                return;
            }
            MyFunc.FillArray(VisibleField.Array, ' ');
            //Global.FillBroders(Field);
            //MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, Field, true);

            Pages.Primis = Scroller001.GetMin() / VisibleField.Array.GetLength(0) + 1;
            string TempoString = $" Current Page {Pages.Primis} of {Pages.Secundus} ";

            HelpField.SetLabel(MyFunc.Set(MyFunc.AlignString(TempoString.Length, VisibleField.Array.GetLength(1), 1), 0), TempoString);

            MyFunc.Geminus <int> TempoKoords = MyFunc.Set(0, 0);
            for (int i = Scroller001.GetMin(); i < Scroller001.GetMax(); ++i)
            {
                MyFunc.CopyStringToArray(ref TempoKoords, Data[i], VisibleField.Array, true);
                ++TempoKoords.Secundus;
            }

            //Global.FillBroders(VisibleField.Array);
            //MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, VisibleField.Array, true);

            MyFunc.Copy(ref VisibleField.Koords, VisibleField.Array, MainField.GetField());
            MainField.Show();

            HelpField.Show();
            //MyFunc.Copy(ref VisibleField.Koords, VisibleField.Array, Global.Field);
        }
Exemplo n.º 10
0
 public void Clear()
 {
     MyFunc.FillArray(SomeArray, ' ');
 }
Exemplo n.º 11
0
 public void NewName(string NewName001)
 {
     MyFunc.FillArray(SomeArray, ' ');
     MyFunc.CopyStringToArray(0, NewName001, SomeArray);
 }
Exemplo n.º 12
0
 static public void Clear()
 {
     MyFunc.FillArray(Field, ' ');
     Global.FillBroders(Field);
     MyFunc.CopyStringToArray(Label.Koords, Label.SomeString, Field, true);
 }