public Construct(uint x, uint y, MapField baseField, Color color) {
			Size = new Vector2u(x, y);
			Location = new MapFieldList(this);
			BaseField = baseField;
			color_ = color;
			newColor_ = color;
			SetTextureFromColor();
			BuildJob = new ConstructingJob(this);
		}
 public Construct(uint x, uint y, MapField baseField, Color color)
 {
     Size      = new Vector2u(x, y);
     Location  = new MapFieldList(this);
     BaseField = baseField;
     color_    = color;
     newColor_ = color;
     SetTextureFromColor();
     BuildJob = new ConstructingJob(this);
 }
Example #3
0
 public ExcelData(string fname, MapFieldList mf, bool check=true)
 {
     filename = fname;
     MFL = mf;
     ProgressDialog dlg2 = new ProgressDialog();
     dlg2.Owner = null;
     for (int index = 0; index < App.Current.Windows.Count; index++)
     {
         if (App.Current.Windows[index].Title == "ΕΥΕ Sampling")
         {
             dlg2.Owner = App.Current.Windows[index];
             break;
         }
     }
     dlg2.DialogText = "Εισαγωγή Δεδομένων από αρχείο";
     int startValue = 0;
     dlg2.RunWorkerThread(startValue, GetDataCheck);
 }
Example #4
0
        public void DoFillData(String t, ListOfItems li, MapFieldList m)
        {
            table = t;
            mf = m;
            ldata = li;

            ProgressDialog dlg2 = new ProgressDialog();
            dlg2.Owner = null;
            for (int index = 0; index < App.Current.Windows.Count; index++)
            {
                if (App.Current.Windows[index].Title == "ΕΥΕ Sampling")
                {
                    dlg2.Owner = App.Current.Windows[index];
                    break;
                }
            }
            dlg2.DialogText = "Καταγραφή δεδομένων στη Βάση.";
            int startValue = 0;
            dlg2.RunWorkerThread(startValue, FillDatal);
        }
Example #5
0
        /// <summary>
        ///     Allows the user to easily clear all data from a specific table.
        /// </summary>
        /// <param name="table">The name of the table to clear.</param>
        /// <returns>A boolean true or false to signify success or failure.</returns>
        public bool FillData(String table, ExcelData edata, MapFieldList mf)
        {
            try
            {

               foreach(DataRow r in edata.Data.Table.Rows)
               {
                   Dictionary<string, string> dict = new Dictionary<string, string>(){};
                   int i = 0;
                   foreach(Mapfield m in mf)
                   {
                       dict.Add(m.Name,r[i++].ToString());
                   }
                   this.Insert(table, dict);
               }
                return true;
            }
            catch
            {
                return false;
            }
        }