public void ModifyAccess(AccessQualifier aq)
        {
            if (accessQualifier != aq || !firstChanged)
            {
                machineText.Text = "";
                String[] toPrint = aq == AccessQualifier.AccessLocked ? adminNotInView :
                                   (aq == AccessQualifier.AccessRestricted ? restrictedInView : onlyAdminInView);
                accessQualifier = aq;
                dispatchTimer.Stop();
                dispatchTimer.Tick    -= timerTick;
                dispatchTimer.Tick    -= timerExit;
                dispatchTimer.Tick    -= mainEventHandler;
                machineText.Text       = "";
                dispatchTimer.Interval = new TimeSpan(0, 0, 0, 0, 1);
                line             = 0;
                pos              = 0;
                mainEventHandler = (object sender, EventArgs args) =>
                {
                    Tuple <int, int> tup = printCyclicText(toPrint, line, pos);
                    line = tup.Item1;

                    pos = tup.Item2;
                };
                dispatchTimer.Tick += mainEventHandler;
                dispatchTimer.Start();
                firstChanged = true;
            }
        }
Beispiel #2
0
 public ImageType(Type sampledType, Dim dim, int depth, bool isArray, bool isMultisampled, int sampleCount,
                  ImageFormat imageFormat, AccessQualifier accessQualifier)
 {
     SampledType     = sampledType;
     Dim             = dim;
     Depth           = depth;
     IsArray         = isArray;
     IsMultisampled  = isMultisampled;
     SampleCount     = sampleCount;
     Format          = imageFormat;
     AccessQualifier = accessQualifier;
 }
        public void ModifyAccess(AccessQualifier aq)
        {
            if (accessQualifier != aq || !firstChanged)
            {
                machineText.Text = "";
                String[] toPrint = aq == AccessQualifier.AccessLocked ? adminNotInView :
                    (aq == AccessQualifier.AccessRestricted ? restrictedInView : onlyAdminInView);
                accessQualifier = aq;
                dispatchTimer.Stop();
                dispatchTimer.Tick -= timerTick;
                dispatchTimer.Tick -= timerExit;
                dispatchTimer.Tick -= mainEventHandler;
                machineText.Text = "";
                dispatchTimer.Interval = new TimeSpan(0, 0, 0, 0, 1);
                line = 0;
                pos = 0;
                mainEventHandler = (object sender, EventArgs args) =>
                {
                    Tuple<int, int> tup = printCyclicText(toPrint, line, pos);
                    line = tup.Item1;

                    pos = tup.Item2;
                };
                dispatchTimer.Tick += mainEventHandler;
                dispatchTimer.Start();
                firstChanged = true;
            }
        }