예제 #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;
        }
    }
예제 #2
0
        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();
            }
        }
예제 #3
0
        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();
            }
        }
예제 #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;
        }
예제 #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();
            }
        }
예제 #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);
    }
예제 #7
0
 public GameObject GetForm(FormColor col)
 {
     return(FormsResource.First(x => x.FormType == col).FormPrefab);
 }