Exemple #1
0
    public void DisplayForm(Order order)
    {
        FormColor   = order.FormColor;
        Attachments = order.Attachments;

        this.GetComponent <Image>().color = GlobalReferences.resources.GetComponent <FormResources>().GetForm(FormColor).GetComponent <SpriteRenderer>().color;

        if (Attachments.Contains(Attachment.blueSeal))
        {
            BlueSeal.enabled = true;
        }

        if (Attachments.Contains(Attachment.greenSeal))
        {
            GreenSeal.enabled = true;
        }

        if (Attachments.Contains(Attachment.redSeal))
        {
            RedSeal.enabled = true;
        }

        if (Attachments.Contains(Attachment.duplicateCopy))
        {
            Copies.enabled = true;
        }
    }
        private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormColor fc = new FormColor();

            fc.DT  = dataTable;
            fc.ID  = forecastReport.ID.ToString();
            fc.For = typeFlag;
            if (fc.ShowDialog() == DialogResult.OK)
            {
                RefreshChart();
            }
        }
        void chart_user1_SetColor()
        {
            FormColor fc = new FormColor();

            fc.DT  = dataTable;
            fc.ID  = forecastReport.ID.ToString();
            fc.For = type;
            if (fc.ShowDialog() == DialogResult.OK)
            {
                RefreshChart();
            }
        }
Exemple #4
0
        private void BtnDarkMode_Click(object sender, EventArgs e)
        {
            FormColor formColor = new FormColor(isDark);

            foreach (Control control in this.Controls)
            {
                if (control.GetType() == typeof(Button))
                {
                    ((Button)control).FlatStyle = formColor.FlatStyle;
                }
                control.BackColor = this.BackColor = formColor.BackColor;
                control.ForeColor = this.ForeColor = formColor.ForeColor;
            }
            isDark = !isDark;
        }
Exemple #5
0
        void chart_user1_SetColor()
        {
            DataTable dt = dataTable.Copy();

            foreach (DataRow row in dt.Rows)
            {
                row["Title"] = row["Col3"].ToString() + "-" + row["Title"].ToString();
            }
            FormColor fc = new FormColor();

            fc.DT  = dt;
            fc.ID  = MIS.ProgUID;
            fc.For = type;
            if (fc.ShowDialog() == DialogResult.OK)
            {
                RefreshChart();
            }
        }
Exemple #6
0
    public Order()
    {
        this.FormColor = (FormColor)Random.Range(0, Enum.GetValues(typeof(FormColor)).Length);

        var allAttachments = Enum.GetValues(typeof(Attachment)) as Attachment[];
        var availableAtt   = allAttachments.ToList();

        var attachmentCount     = Random.Range(0, Enum.GetValues(typeof(Attachment)).Length + 1);
        var requiredAttachments = new List <Attachment>();

        while (attachmentCount > 0)
        {
            var attch = availableAtt.PickOne();
            requiredAttachments.Add(attch);
            availableAtt.Remove(attch);
            attachmentCount--;
        }

        Attachments = requiredAttachments.ToArray();
        TimeLimit   = baseTime + (timeFactor * Attachments.Length);
    }
 public GameObject GetForm(FormColor col)
 {
     return(FormsResource.First(x => x.FormType == col).FormPrefab);
 }