Ignore:
Timestamp:
Dec 15, 2009, 12:43:48 PM (12 years ago)
Author:
wiefels
Message:

Transpositions quickwatch background is now changing depending on the status of work the plugin does.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Transposition/TranspositionPresentation.xaml.cs

    r997 r1011  
    7171        private byte[,] permuted_matrix;
    7272        private Brush[,] mat_back;
     73        //private ColorAnimation backFlip;
    7374        private DoubleAnimation nop;
    7475        private DoubleAnimation fadeIn;
     
    99100        private void init(byte[,] read_in_matrix, byte[,] permuted_matrix, String keyword, int per, int rein, int reout, int act, int[] key,int number)
    100101        {
     102            //hier werden die farben angerührt
    101103            LinearGradientBrush myBrush = new LinearGradientBrush();
    102104            myBrush.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 0.0));
    103105            myBrush.GradientStops.Add(new GradientStop(Colors.SkyBlue, 0.5));
    104106            myBrush.GradientStops.Add(new GradientStop(Colors.PowderBlue, 1.0));
     107                     
    105108
    106109            mycanvas.Background = myBrush;
     110
    107111            try
    108112            {
     
    129133            nop.Duration = new Duration(TimeSpan.FromMilliseconds((1001 - speed)));
    130134
     135            //ColorAnimation myColorAnimation = new ColorAnimation();
     136            //myColorAnimation.From = Colors.Blue
     137            //myColorAnimation.To = Colors.Red;
     138            //myColorAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(1001 - speed));
    131139
    132140            if (act == 0)
     
    687695            myupdateprogress(i * 1000 / teba.GetLength(0) + 1000);
    688696            //OLOo
     697
     698            LinearGradientBrush myBrush1 = new LinearGradientBrush();
     699            myBrush1.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 1.0));
     700            //myBrush1.GradientStops.Add(new GradientStop(Colors.SkyBlue, 0.5));
     701            //myBrush1.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 1.0));
     702
     703            mycanvas.Background = myBrush1;
     704
    689705            if (per == 0) { textBox2.Text = "permuting by row"; }
    690706            else { textBox2.Text = "permuting by column"; }
     
    865881                if (!Stop)
    866882                    brush.BeginAnimation(SolidColorBrush.ColorProperty, myColorAnimation);
     883
     884             
    867885            }
    868886
    869             //OLO hier falsch
    870             //textBox2.Text = "status: accomplished";
     887            //LinearGradientBrush myBrush1 = new LinearGradientBrush();
     888            ////myBrush1.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 0.0));
     889            ////myBrush1.GradientStops.Add(new GradientStop(Colors.SkyBlue, 0.5));
     890            //myBrush1.GradientStops.Add(new GradientStop(Colors.PowderBlue, 1.0));
     891
     892            //mycanvas.Background = myBrush1;
     893            //textBox2.Text = "accomplished"; //finish
     894
    871895        }
    872896
     
    937961        public void readout()
    938962        {
    939             //OLO?
     963            LinearGradientBrush myBrush = new LinearGradientBrush();
     964            myBrush.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 1.0));
     965            myBrush.GradientStops.Add(new GradientStop(Colors.SkyBlue, 0.5));
     966            myBrush.GradientStops.Add(new GradientStop(Colors.PowderBlue, 0.0));
     967
     968           mycanvas.Background = myBrush;
     969
    940970            if (reout == 0) { textBox2.Text = "reading out by row"; }
    941971            else { textBox2.Text = "reading out by column"; }
    942972
    943             DoubleAnimation myDoubleAnimation = new DoubleAnimation();
     973           DoubleAnimation myDoubleAnimation = new DoubleAnimation();
    944974            myDoubleAnimation.From = 1.0;
    945975            myDoubleAnimation.To = 0.0;
     
    9981028                }
    9991029            }
     1030         
    10001031        }
    10011032
     
    11531184            sizeChanged(this, EventArgs.Empty);
    11541185            feuerEnde(this, EventArgs.Empty);
     1186            LinearGradientBrush myBrush1 = new LinearGradientBrush();
     1187            //myBrush1.GradientStops.Add(new GradientStop(Colors.CornflowerBlue, 0.0));
     1188            //myBrush1.GradientStops.Add(new GradientStop(Colors.SkyBlue, 0.5));
     1189            myBrush1.GradientStops.Add(new GradientStop(Colors.PowderBlue, 1.0));
     1190
     1191            mycanvas.Background = myBrush1;
     1192            textBox2.Text = "accomplished"; //finish
    11551193
    11561194        }
Note: See TracChangeset for help on using the changeset viewer.