Exemple #1
0
 public void DrawRhombusBlockAndUpdate(int[] portals)
 {
     if (this.myFactors == null || !MyDAMap.TryColorBlockRhombus(portals, this.myFactors[this.MapDimList.SelectedIndex][0], this.myFactors[this.MapDimList.SelectedIndex][1], Color.Red, 0.5, ref this.DAMapImage))
     {
         return;
     }
     this.Tab.mapDynamicView.Image = (Image)this.DAMapImage;
 }
Exemple #2
0
 public void DrawSquareBlockAndUpdate(int X, int Y, Color color)
 {
     if (!MyDAMap.TryColorBlockSquare((ushort)X, (ushort)Y, 0.5, color, ref this.DAMapImage))
     {
         return;
     }
     this.Tab.mapDynamicView.Image = (Image)this.DAMapImage;
 }
Exemple #3
0
        public void OpenDAMapFile(string mapNumber)
        {
            int initialDimIndex = 0, index = 0;

            if (this.Tab.textBoxMapNum.Text != mapNumber)
            {
                this.Tab.textBoxMapNum.Text = mapNumber;
            }
            this.MapDimList.Items.Clear();
            if ((this.myFactors = MyDAMap.GetFactors(Options.MapsDirectory + "\\lod" + mapNumber + ".map")) == null)
            {
                this.ClearMap();
            }
            else
            {
                foreach (ushort[] numArray in this.myFactors)
                {
                    if (this.Tab.Client.Base.LoggedIn)
                    {
                        if (numArray[0] == this.Tab.Client.Base.DaMap.Width && numArray[1] == this.Tab.Client.Base.DaMap.Height)
                        {
                            initialDimIndex = index;
                        }
                    }
                    this.MapDimList.Items.Add((object)numArray[0].ToString() + "x" + numArray[1].ToString());
                    index++;
                }
                string[] strArray = this.Tab.textBoxMapAxis.Text.Split(new char[1]
                {
                    ' '
                }, StringSplitOptions.RemoveEmptyEntries);
                this.MapDimList.SelectedIndex = initialDimIndex;

                /*if (strArray.Length == 2 && strArray[0] != "-1" && (strArray[1] != "-1" && this.MapDimList.Items.Contains((object)(strArray[0] + "x" + strArray[1]))))
                 *  this.MapDimList.SelectedItem = (object)(strArray[0] + "x" + strArray[1]);
                 * else
                 *  this.MapDimList.SelectedIndex = this.myFactors.Count / 2;*/
            }
        }